Re: [systemd-devel] [PATCH 2/2] Adding binary to shutdown the system

2010-10-06 Thread Karel Zak
On Wed, Oct 06, 2010 at 02:05:44AM -0300, Gustavo Sverzut Barbieri wrote: +/* umount all mountpoints, swaps, and loopback devices */ +retries = FINALIZE_ATTEMPTS; +while (need_umount || need_swapoff || need_loop_detach) { +if (need_umount) { +

Re: [systemd-devel] [PATCH 1/2] Adding unmount functions to be used in shutdown

2010-10-06 Thread Kay Sievers
On Wed, Oct 6, 2010 at 14:17, Karel Zak k...@redhat.com wrote: +        if ((dir = opendir(/sys/class/block)) == NULL) +                return -errno; + +        while ((d = readdir(dir))) { +                MountPoint *lb; +                char buf[PATH_MAX]; +                char *loop;