Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=7330e96752f4deb407dab45b790aae5893bdfe80
commit 7330e96752f4deb407dab45b790aae5893bdfe80 Author: James Buren <[email protected]> Date: Tue Jul 3 21:42:04 2012 -0500 libfwtimeconfig: use fwutil_system_chroot instead of system diff --git a/libfwtimeconfig/libfwtimeconfig.c b/libfwtimeconfig/libfwtimeconfig.c index 55ce249..8ce6b12 100644 --- a/libfwtimeconfig/libfwtimeconfig.c +++ b/libfwtimeconfig/libfwtimeconfig.c @@ -41,10 +41,11 @@ GList *zones=NULL; */ /** Creates the hardware clock configuration file. + * @param root directory to chroot to * @param mode clock mode * @return 1 on failure, 0 on success */ -int fwtime_hwclockconf(char *mode) +int fwtime_hwclockconf(const char *root,const char *mode) { char cmd[_POSIX_ARG_MAX]; @@ -57,7 +58,7 @@ int fwtime_hwclockconf(char *mode) strcat(cmd," > " FWTIME_LOGDEV " 2>&1"); - return system(cmd) ? 1 : 0; + return fwutil_system_chroot(root,cmd); } /** Helper function for finding timezones available. The result will be written @@ -65,7 +66,7 @@ int fwtime_hwclockconf(char *mode) * @param dirname path of the dir which contains the timezones * @return 1 on failure, 0 on success */ -int fwtime_find(char *dirname) +int fwtime_find(const char *dirname) { DIR *dir; struct dirent *ent; diff --git a/libfwtimeconfig/libfwtimeconfig.h b/libfwtimeconfig/libfwtimeconfig.h index 6191a11..578f001 100644 --- a/libfwtimeconfig/libfwtimeconfig.h +++ b/libfwtimeconfig/libfwtimeconfig.h @@ -19,5 +19,5 @@ * USA. */ -int fwtime_hwclockconf(char *mode); -int fwtime_find(char *dirname); +int fwtime_hwclockconf(const char *root,const char *mode); +int fwtime_find(const char *dirname); _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
