On Thursday 08 April 2010 19:47:30 Bob Dunlop wrote: > On Thu, Apr 08 at 09:39, Charles Manning wrote: > > During the initrd building, the building of makedev failed due to the > > compiler being -Werror and system() return value being ignored. I got > > past that with the following patch. I'm sure this should rather be fixed > > elsewhere. > > A simpler patch would be to replace system() by calling sync() direct. > > $ diff -u makedevs.c~ makedevs.c > --- makedevs.c~ 2010-04-08 08:55:31.000000000 +1200 > +++ makedevs.c 2010-04-08 08:56:56.608535407 +1200 > @@ -528,7 +528,7 @@ > } > fclose(table); > > - system("/bin/sync"); > + sync(); > > return 0; > } Well that's certainly neater but I was a bit concerned that perhaps running through system() might be doing something subtly different. The other much uglier one-liner is - system("/bin/sync"); + { int e = system("/bin/sync"); } which should probably earn me a thrashing. -- Charles