[PATCH] mount.c: bail out early when no media exists

Denys Vlasenko vda.linux at googlemail.com
Sat Nov 7 19:52:39 UTC 2015


On Wed, Oct 28, 2015 at 3:08 PM,  <sgw at linux.intel.com> wrote:
> From: "Maxin B. John" <maxin.john at intel.com>
>
> The current behaviour of busybox is to try all fstype when automounting
> even when no media exists.  The util-linux mount command bails when
> no media exists, so change the behaviour of busybox to do the same.
>
> without this fix:
> $ time ./busybox mount /dev/cdrom /mnt
> mount: mounting /dev/cdrom on /mnt failed: No medium found
>
> real    0m0.573s
> user    0m0.000s
> sys     0m0.007s
>
> with this fix:
> $ time ./busybox mount /dev/cdrom /mnt
> mount: mounting /dev/cdrom on /mnt failed: No medium found
>
> real    0m0.042s
> user    0m0.000s
> sys     0m0.002s

The message is the same, it just took a bit longer to fail.

Is it that critical to you to not wait 0.5 second?


More information about the busybox mailing list