search for: find_device_sysfs

Displaying 4 results from an estimated 4 matches for "find_device_sysfs".

2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix memory leak
...NULL; bool done; mtab = setmntent(mtab_file, "r"); @@ -1131,7 +1131,7 @@ static const char *find_device(const char *mtab_file, dev_t dev) * On newer Linux kernels we can use sysfs to get a backwards mapping * from device names to standard filenames */ -static const char *find_device_sysfs(dev_t dev) +static char *find_device_sysfs(dev_t dev) { char sysname[64]; char linkname[PATH_MAX]; @@ -1281,9 +1281,20 @@ err: return rv; } -static const char *get_devname(const char *path) +static char *dupname(const char *name) { - const char *devname = NULL; + char *out...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...NULL; bool done; mtab = setmntent(mtab_file, "r"); @@ -1131,7 +1131,7 @@ static const char *find_device(const char *mtab_file, dev_t dev) * On newer Linux kernels we can use sysfs to get a backwards mapping * from device names to standard filenames */ -static const char *find_device_sysfs(dev_t dev) +static char *find_device_sysfs(dev_t dev) { char sysname[64]; char linkname[PATH_MAX]; @@ -1281,9 +1281,20 @@ err: return rv; } -static const char *get_devname(const char *path) +static char *dupname(const char *name) +{ + char *out = NULL; + int len = 0; + i...
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...NULL; bool done; mtab = setmntent(mtab_file, "r"); @@ -1131,7 +1131,7 @@ static const char *find_device(const char *mtab_file, dev_t dev) * On newer Linux kernels we can use sysfs to get a backwards mapping * from device names to standard filenames */ -static const char *find_device_sysfs(dev_t dev) +static char *find_device_sysfs(dev_t dev) { char sysname[64]; char linkname[PATH_MAX]; @@ -1281,9 +1281,20 @@ err: return rv; } -static const char *get_devname(const char *path) +static char *dupname(const char *name) { - const char *devname = NULL; + char *out...
2015 Sep 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...tab = setmntent(mtab_file, "r"); > @@ -1131,7 +1131,7 @@ static const char *find_device(const char > *mtab_file, dev_t dev) > * On newer Linux kernels we can use sysfs to get a backwards mapping > * from device names to standard filenames > */ > -static const char *find_device_sysfs(dev_t dev) > +static char *find_device_sysfs(dev_t dev) > { > char sysname[64]; > char linkname[PATH_MAX]; > @@ -1281,9 +1281,20 @@ err: > return rv; > } > > -static const char *get_devname(const char *path) > +static char *dupname(const char *name)...