Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=23b4526b49382ae934370f54f52f21844746b225
commit 23b4526b49382ae934370f54f52f21844746b225 Author: James Buren <[email protected]> Date: Tue Jul 3 20:56:39 2012 -0500 libfwutil: remove fwutil_init and fwutil_release diff --git a/libfwutil/libfwutil.c b/libfwutil/libfwutil.c index 479a336..f628c51 100644 --- a/libfwutil/libfwutil.c +++ b/libfwutil/libfwutil.c @@ -184,59 +184,6 @@ char *fwutil_glist_display(GList *list, char *sep) return(ret); } -/** Initialize the environment if necessary - * @return true if fwx_release() call is needed later, false if not - */ -int fwutil_init() -{ - struct stat buf; - FILE *fi, *fo; - int ret=0; - - if(stat("/proc/1", &buf)) - { - system("mount /proc"); - ret++; - } - if(stat("/dev/zero", &buf)) - { - system("/etc/rc.d/rc.udev"); - system("mount / -o rw,remount"); - - - system("mount /dev/pts"); - ret++; - } - if((fi = fopen("/proc/mounts", "r"))) - { - if((fo = fopen("/etc/mtab", "w"))) - { - char line[256]; - - while(!feof(fi)) - { - if(!fgets(line, 255, fi)) - break; - if(!strstr(line, "root")) - fprintf(fo, "%s", line); - } - fclose(fo); - } - fclose(fi); - } - return(ret); -} - -/** Release the environment - */ -void fwutil_release() -{ - umount("/dev/pts"); - umount("/dev"); - umount("/sys"); - umount("/proc"); -} - /** does the same as cp * @param src source * @param dest destination diff --git a/libfwutil/libfwutil.h b/libfwutil/libfwutil.h index c3f9c5d..3620839 100644 --- a/libfwutil/libfwutil.h +++ b/libfwutil/libfwutil.h @@ -43,8 +43,6 @@ int fwutil_system_chroot(const char *root,const char *cmd); void fwutil_i18ninit(char *namespace); char *fwutil_trim(char *str); char *fwutil_strtoupper(char *str); -int fwutil_init(); -void fwutil_release(); int fwutil_cp(char *src, char *dest); #ifdef __G_LIB_H__ char *fwutil_glist_display(GList *list, char *sep); _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
