diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-10-20 13:15:26 +0200 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:06:44 -0700 |
commit | 993a633ab848487b8e546f66087595e2dc5aa4af (patch) | |
tree | ee1303c8a6b13cbcc9ac97f7a58bcc67d1aee2fd /libsysfs/sysfs_utils.c | |
parent | f8c1ccde6aaf08c858616c9a8a83c06d609f52f5 (diff) |
[PATCH] update to libsysfs 1.2.0 and add some stuff klib_fixup
Diffstat (limited to 'libsysfs/sysfs_utils.c')
-rw-r--r-- | libsysfs/sysfs_utils.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libsysfs/sysfs_utils.c b/libsysfs/sysfs_utils.c index f65e5df3aa..8b1f56ed14 100644 --- a/libsysfs/sysfs_utils.c +++ b/libsysfs/sysfs_utils.c @@ -20,16 +20,13 @@ * 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 } /* @@ -454,7 +446,7 @@ int sysfs_path_is_link(const char *path) return 1; } if ((lstat(path, &astats)) != 0) { - dprintf("stat() failed"); + dprintf("stat() failed\n"); return 1; } if (S_ISLNK(astats.st_mode)) @@ -477,7 +469,7 @@ int sysfs_path_is_file(const char *path) return 1; } if ((lstat(path, &astats)) != 0) { - dprintf("stat() failed"); + dprintf("stat() failed\n"); return 1; } if (S_ISREG(astats.st_mode)) |