X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fsync.c;h=6341415a3c94660799725836c4a3a71ea2dbf658;hb=55c249f666faddb7d4e999d8a8e3ab66bccfae96;hp=76bd590129bf50d07618d583291d8b99a727316b;hpb=4fd0c29d35304277091d128b65fd81401bcc9114;p=libucw.git diff --git a/lib/sync.c b/lib/sync.c index 76bd5901..6341415a 100644 --- a/lib/sync.c +++ b/lib/sync.c @@ -1,7 +1,7 @@ /* - * Sherlock Library -- Syncing Directories + * UCW Library -- Syncing Directories * - * (c) 2004 Martin Mares + * (c) 2004--2005 Martin Mares */ #include "lib/lib.h" @@ -10,9 +10,13 @@ #include void -sync_dir(byte *name) +sync_dir(const char *name) { - int fd = open(name, O_RDONLY | O_DIRECTORY); + int fd = open(name, O_RDONLY +#ifdef CONFIG_LINUX + | O_DIRECTORY +#endif +); if (fd < 0) goto err; int err = fsync(fd); @@ -20,5 +24,5 @@ sync_dir(byte *name) if (err >= 0) return; err: - log(L_ERROR, "Unable to sync directory %s: %m", name); + msg(L_ERROR, "Unable to sync directory %s: %m", name); }