X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fsync.c;h=6341415a3c94660799725836c4a3a71ea2dbf658;hb=55c249f666faddb7d4e999d8a8e3ab66bccfae96;hp=8877e31072dc4582840703349a961bf0e6707ff0;hpb=cad27e97e6370f96903d42aaf345c099af0a03bd;p=libucw.git diff --git a/lib/sync.c b/lib/sync.c index 8877e310..6341415a 100644 --- a/lib/sync.c +++ b/lib/sync.c @@ -1,7 +1,7 @@ /* * 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); }