[systemd-devel] Failure to remount / ro (Was: Re: [PATCH 2/4] Adding unmount functions to be used in shutdown)
Andrey Borzenkov
arvidjaar at mail.ru
Sun Oct 24 10:10:40 PDT 2010
On Sun, Oct 24, 2010 at 7:32 PM, Gustavo Sverzut Barbieri
<barbieri at profusion.mobi> wrote:
>> +static int mount_points_list_umount(MountPoint **mount_point_list_head) {
>> + MountPoint *mp, *mp_next;
>> + int failed = 0;
>> +
>> + LIST_FOREACH_SAFE(mount_point, mp, mp_next, *mount_point_list_head) {
>> + if (streq(mp->path, "/"))
>> + continue;
>> ^ add failed++ to make sure / is remounted-ro?
>
> it would be a bit misleading.
>
Actually it is only name "failed" that is misleading. Otherwise it is
quite logical - it makes it return number of mount points that had not
been unmounted. Change name to n_still_mounted and it should not be
misleading anymore.
More information about the systemd-devel
mailing list