On Wed, Oct 6, 2010 at 2:05 AM, Gustavo Sverzut Barbieri <[email protected]> wrote: > From: Fabiano Fidencio <[email protected]> > > This functions will: > - umount all mount points that aren't API > - remount read-only all mount points that can't be umounted > - umount all swap devices. > - detach all loopback devices ... > + ioctl(fd, LOOP_CLR_FD, 0); > + r = errno; > + close_nointr(fd); > + > + if (r == ENXIO) /* not bound, so no error */ > + r = 0; > + errno = r; > + return -errno;
this version handles ENXIO, issued by kernel whenever the loop was not bound, thus we avoid looping through all devices until maximum retries are reached, speeding up the shutdown. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
