chiark / gitweb /
[PATCH] klibc supports LOG_PID now, so remove our own implementation
[elogind.git] / libsysfs / sysfs_utils.c
index 492c7fa668e5dd3ec445d29085e6ce70ab05f091..8b1f56ed146f73ea47ad012810542a859e4efd07 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  */
-#include "sysfs/libsysfs.h"
+#include "libsysfs.h"
 #include "sysfs.h"
-#ifndef __KLIBC__
-#include <mntent.h>
-#endif
 
-static int sort_char(void *new_elem, void *old_elem)
+static int sort_char(void *new, void *old)
 {
-       return ((strncmp((char *)new_elem, (char *)old_elem
-                       strlen((char *)new_elem))) < 0 ? 1 : 0);
+       return ((strncmp((char *)new, (char *)old
+                       strlen((char *)new))) < 0 ? 1 : 0);
 }
 
 /**
@@ -66,10 +63,6 @@ int sysfs_remove_trailing_slash(char *path)
 static int sysfs_get_fs_mnt_path(const char *fs_type, 
                                char *mnt_path, size_t len)
 {
-#ifdef __KLIBC__
-       safestrcpymax(mnt_path, "/sys", len);
-       return 0;
-#else
        FILE *mnt;
        struct mntent *mntent;
        int ret = 0;
@@ -106,7 +99,6 @@ static int sysfs_get_fs_mnt_path(const char *fs_type,
                ret = -1;
        
        return ret;
-#endif
 }
 
 /*