The kernel can't handle umount /dev/hdc, we have to do it through mtab,
authorRob Landley <rob@landley.net>
Thu, 17 Aug 2006 19:07:20 +0000 (19:07 -0000)
committerRob Landley <rob@landley.net>
Thu, 17 Aug 2006 19:07:20 +0000 (19:07 -0000)
commit4470b74e29f98ffdd39acf8085e5b7cd0758edaa
treebf8214dbd36de26f10c48bd2f2811aab6eebc643
parenteb28ce46448e280742465d027e86701766c34d97
The kernel can't handle umount /dev/hdc, we have to do it through mtab,
except that we still have to work when there is no mtab.

Oh, and while we're at it, take advantage of the fact that modern processors
avoid branches via conditional assignment where possible.  ("x = a ? b : c;"
turns into "x = c; if (a) x = b;" because that way there's no branch to
potentially mispredict and thus never a bubble in the pipeline.  The if(a)
turns into an assembly test followed by a conditional assignment (rather
than a conditional jump).)  So since the compiler is going to do that _anyway_,
we might as well take advantage of it to produce a slightly smaller binary.

So there.
util-linux/umount.c