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

2010-10-05 Thread Gustavo Sverzut Barbieri
On Wed, Oct 6, 2010 at 2:05 AM, Gustavo Sverzut Barbieri wrote: > From: Fabiano Fidencio > > 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 ...

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

2010-10-05 Thread Gustavo Sverzut Barbieri
On Wed, Oct 6, 2010 at 2:05 AM, Gustavo Sverzut Barbieri wrote: > From: Fabiano Fidencio > > This functions are working as follows: >    - Send a SIGTERM to all processes that may be finished >    - Send a SIGKILL to all processes that still live and may be finished >    - Try to unmount all moun

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

2010-10-05 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points - Try to remount read-only all mount points that can't be um

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

2010-10-05 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio 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 TODO: - umount dms Mountpoints are being read from /proc/self/mountinfo.

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

2010-10-05 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished - Send a SIGKILL to all processes that still live and may be finished - Try to unmount all mount points - Try to remount read-only all mount points that can't be um

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

2010-10-05 Thread Gustavo Sverzut Barbieri
From: Fabiano Fidencio 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 TODO: - umount dms Mountpoints are being read from /proc/self/mountinfo.

Re: [systemd-devel] Forgot break in switch? (+ PATCH)

2010-10-05 Thread Lennart Poettering
On Fri, 01.10.10 20:02, Matthias Schiffer ([email protected]) wrote: > As I didn't get any comments on my last mail, I'm trying again, now > with a patch attached :-D > > I don't know if this patch is correct or if there is any reason that > break is missing, but applying it fixes

Re: [systemd-devel] Partially failed legacy initscripts

2010-10-05 Thread Lennart Poettering
On Tue, 05.10.10 21:08, Andrey Borzenkov ([email protected]) wrote: > I noticed that tmp unmount failed even if I rebooted immediately after > booting up. The reason was vmware initscript. Script partially failed > because no drivers were present in currently running kernel. Still > some stuff w

Re: [systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system

2010-10-05 Thread Lennart Poettering
On Tue, 05.10.10 18:25, Michael Biebl ([email protected]) wrote: > > 2010/10/5 : > > From: Fabiano Fidencio > > > > This functions are working as follows: > >    - Send a SIGTERM to all processes that may be finished. > >    - Send a SIGKILL to all processes that still live and > >    may be fin

Re: [systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system

2010-10-05 Thread Lennart Poettering
On Tue, 05.10.10 08:41, [email protected] ([email protected]) wrote: > + > +#define TIMEOUT_USEC500 To make this more readable please write 5*USEC_PER_SEC here. > +static bool ignore_proc(pid_t pid) { > +if (pid == 1) > +return true; > + > +ret

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

2010-10-05 Thread Gustavo Sverzut Barbieri
On Tue, Oct 5, 2010 at 5:38 PM, Lennart Poettering wrote: > On Tue, 05.10.10 08:41, [email protected] ([email protected]) > wrote: > >> +static int swap_list_get(MountPoint **swap_list_head) { >> +        FILE *proc_swaps; >> + >> +        if (!(proc_swaps = fopen("/proc/swaps", "re")

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

2010-10-05 Thread Lennart Poettering
On Tue, 05.10.10 08:41, [email protected] ([email protected]) wrote: > +static int swap_list_get(MountPoint **swap_list_head) { > +FILE *proc_swaps; > + > +if (!(proc_swaps = fopen("/proc/swaps", "re"))) > +return -errno; > + > +(void) fscanf(pro

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

2010-10-05 Thread Lennart Poettering
On Thu, 30.09.10 18:10, [email protected] ([email protected]) wrote: A last round of comments: > +int umount_init(void) { > +LIST_HEAD(MountPoint, mp_list_head); > +int r; > +bool changed; This isn't really an "initialization", is it? I'd prefer the name umoun

Re: [systemd-devel] [PATCH 4/4] Fixing typo: seperator -> separator

2010-10-05 Thread Lennart Poettering
On Thu, 30.09.10 18:10, [email protected] ([email protected]) wrote: > From: Fabiano Fidencio > > --- > src/mount.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/mount.c b/src/mount.c > index 2fb5822..52743db 100644 > --- a/src/mount.c > +++ b/s

Re: [systemd-devel] [PATCH 1/4] Don't stop the mountinfo's parser if one line can't be read

2010-10-05 Thread Lennart Poettering
On Tue, 05.10.10 08:41, [email protected] ([email protected]) wrote: > From: Fabiano Fidêncio > > The current behavior of the /proc/self/mountinfo's parser > is stop the parser if the parser fail. > I'm only changing this behavior to try the next line and adding > a warning if occurs

Re: [systemd-devel] [PATCH] fix typo: s/seperat/separat/g

2010-10-05 Thread Lennart Poettering
On Wed, 29.09.10 09:13, Dave Reisner ([email protected]) wrote: > Signed-off-by: Dave Reisner > --- > man/systemd.service.xml |2 +- > src/log.c |2 +- > src/logger.c|2 +- > src/mount.c |2 +- > src/util.c | 12 ++--

Re: [systemd-devel] [systemd-commits] src/readahead-collect.c src/readahead-common.c

2010-10-05 Thread Lennart Poettering
On Thu, 30.09.10 13:38, Gustavo Sverzut Barbieri ([email protected]) wrote: > On Thu, Sep 30, 2010 at 1:06 PM, Lennart Poettering > wrote: > >         if (st->st_size <= 0 || st->st_size > file_size_max) { > > -                log_debug("Not preloading file %s with size out of bounds > >

Re: [systemd-devel] [PATCH] Compiler and linker flags to reduce binary size.

2010-10-05 Thread Lennart Poettering
On Thu, 30.09.10 15:58, Gustavo Sverzut Barbieri ([email protected]) wrote: > Reduce number of exported symbols with -fvisibility=hidden by default, > this is safe as we're not generating and loadable library and our > binaries should have no exported symbol other than main(). This alone >

Re: [systemd-devel] [PATCH] unit-name: fix unit name escaping

2010-10-05 Thread Lennart Poettering
On Fri, 01.10.10 19:58, Mike Kelly ([email protected]) wrote: > we want to do a bitwise shift, not a greater-than comparision Ouch. Brown paperbag bug. Merged! Thanks, Lennart -- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list syste

[systemd-devel] Partially failed legacy initscripts

2010-10-05 Thread Andrey Borzenkov
I noticed that tmp unmount failed even if I rebooted immediately after booting up. The reason was vmware initscript. Script partially failed because no drivers were present in currently running kernel. Still some stuff was started. But apparently because systemd believed service has failed, it did

[systemd-devel] Fwd: Partially failed legacy initscripts

2010-10-05 Thread Andrey Borzenkov
I noticed that tmp unmount failed even if I rebooted immediately after booting up. The reason was vmware initscript. Script partially failed because no drivers were present in currently running kernel. Still some stuff was started. But apparently because systemd believed service has failed, it did

Re: [systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system

2010-10-05 Thread Michael Biebl
2010/10/5 : > From: Fabiano Fidencio > > This functions are working as follows: >    - Send a SIGTERM to all processes that may be finished. >    - Send a SIGKILL to all processes that still live and >    may be finished. >    - Try to mount all mount points ^ unmount, I guess >

[systemd-devel] [PATCH 4/4] Adding unmount functions to be used in shutdown

2010-10-05 Thread fidencio
From: Fabiano Fidencio 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. TODO: - umount dms - umount loopbacks Mountpoints are being read from /proc/self/mountinfo. Swaps are

[systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system

2010-10-05 Thread fidencio
From: Fabiano Fidencio This functions are working as follows: - Send a SIGTERM to all processes that may be finished. - Send a SIGKILL to all processes that still live and may be finished. - Try to mount all mount points - Try to remount read-only all mount points that can't

[systemd-devel] [PATCH 2/4] Fixing typo: seperator -> separator

2010-10-05 Thread fidencio
From: Fabiano Fidencio --- src/mount.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mount.c b/src/mount.c index 2fb5822..52743db 100644 --- a/src/mount.c +++ b/src/mount.c @@ -1420,7 +1420,7 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags

[systemd-devel] [PATCH 1/4] Don't stop the mountinfo's parser if one line can't be read

2010-10-05 Thread fidencio
From: Fabiano Fidêncio The current behavior of the /proc/self/mountinfo's parser is stop the parser if the parser fail. I'm only changing this behavior to try the next line and adding a warning if occurs a fail. --- src/mount.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-)