Displaying 9 results from an estimated 9 matches for "get_devname".
Did you mean:
get_dev_name
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix memory leak
...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 = NULL;
+ int len = 0;
+ if (name)
+ len = strlen(name);
+ if (len > 0)
+ out = strndup(name, len);
+ return out;
+}
+
+static char *get_devname(const char *path...
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...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 = NULL;
+ int len = 0;
+ if (name)
+ len = strlen(name);
+ if (len > 0)
+ out = strndup(name, len);
+ return out;
+}
+
+static char *get_devname(const char *path...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...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;
+ if (name)
+ len = strlen(name);
+ if (len > 0)
+ out = strndup(name, len);
+ return out;
+}
+
+static char *get_devname(const char *path)
{
- const char *devname = N...
2015 Sep 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...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 = NULL;
> + int len = 0;
> + if (name)
> + len = strlen(name);
> + if (len > 0)
> + out = strndup(name, len);
> + return ou...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...tmp)
- *tmp = '\0';
- }
- break; /* should break and let upper layer try again */
- } else
+ if (!subvol[0]) {
+ get_default_subvol(mnt->mnt_dir, subvol);
+ }
done = true;
}
break;
@@ -623,24 +876,10 @@ static const char *get_devname(const char *path)
#else
- /* check /etc/mtab first, since btrfs subvol info is only in here */
- devname = find_device("/etc/mtab", st.st_dev);
- if (subvol[0] && !devname) { /* we just find it is a btrfs subvol */
- char parent[256];
- char *tmp;
-
- strcpy(parent,...
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...= true;
+ }
+
+ break;
case NONE:
break;
}
@@ -1187,7 +1222,7 @@ static int validate_device_btrfs(int pfd, int dfd)
return -1;
return 0; /* It's good! */
-}
+}
static const char *find_device_btrfs(const char *path)
{
@@ -1276,7 +1311,7 @@ static const char *get_devname(const char *path)
fprintf(stderr, "%s: cannot create device %s\n", program, devname);
return devname;
}
-
+
atexit(device_cleanup); /* unlink the device node on exit */
devname = devname_buf;
}
@@ -1330,10 +1365,15 @@ static int open_device(const char *path, struct...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...break;
+ }
+
+ break;
case NONE:
break;
}
@@ -1187,7 +1218,7 @@ static int validate_device_btrfs(int pfd, int dfd)
return -1;
return 0; /* It's good! */
-}
+}
static const char *find_device_btrfs(const char *path)
{
@@ -1276,7 +1307,7 @@ static const char *get_devname(const char *path)
fprintf(stderr, "%s: cannot create device %s\n", program, devname);
return devname;
}
-
+
atexit(device_cleanup); /* unlink the device node on exit */
devname = devname_buf;
}
@@ -1330,10 +1361,15 @@ static int open_device(const char *path, struct...
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com>
Wrote the documentation below. I think it would be good to push the doc to
the wiki as soon as the UFS support gets merged.
Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install)
-----
There is a confusion about the name of this file system, then I decided to
contact the author who replied:
"The name has always been
2014 May 29
3
[PATCH v2 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com>
Change since v1:
* Fix bug on dentry structure (thank you specification; btw, sarcasm), and
consequently a bug on ufs_readdir.
* Add readlink support (applied tests for symlinks whose destionation path
were stored in blk pointers and the file itself).
* Several improvements.
Wrote the documentation below. I think it would be good to