search for: _devname

Displaying 16 results from an estimated 16 matches for "_devname".

Did you mean: devname
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...sfs 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
1
[PATCH v1 1/1] extlinux: fix memory leak
...sfs 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 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...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...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...sfs 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 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...+++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index 6871fb1..385b364 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -1415,21 +1415,12 @@ static int open_device(const char *path, struct stat *st, char **_devname) return devfd; } -static int btrfs_read_adv(int devfd) -{ - if (xpread(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) - != 2 * ADV_SIZE) - return -1; - - return syslinux_validate_adv(syslinux_adv) ? 1 : 0; -} - -static inline int xfs_read_adv(int devfd) +static int ext_read_adv_...
2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
...S_ADV_OFFSET) - != 2 * ADV_SIZE) { - perror("writing adv"); + if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { return 1; } dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); @@ -1415,59 +1465,6 @@ static int open_device(const char *path, struct stat *st, char **_devname) return devfd; } -static int btrfs_read_adv(int devfd) -{ - if (xpread(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) - != 2 * ADV_SIZE) - return -1; - - return syslinux_validate_adv(syslinux_adv) ? 1 : 0; -} - -static inline int xfs_read_adv(int devfd) -{ - const size_t adv_...
2015 Nov 15
0
[PATCH] extlinux/main.c: space chance
...ot a subvolume - * * 1-> path exists and it is a subvolume + * * 1-> path exists and it is a subvolume * * -1 -> path is unaccessible * */ static int test_issubvolume(char *path) @@ -1385,8 +1385,8 @@ static int open_device(const char *path, struct stat *st, char **_devname) if (!fs_type) { fprintf(stderr, - "%s: not a fat, ntfs, ext2/3/4, btrfs, xfs or" - "ufs1/2 filesystem: %s\n", + "%s: not a fat, ntfs, ext2/3/4, btrfs, xfs" + " or ufs1/2 filesystem: %s\n", program, path); return -1; } -- 1.7.10.4
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
...> - perror("writing adv"); > + if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { > return 1; > } > dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); > @@ -1415,59 +1465,6 @@ static int open_device(const char *path, struct stat > *st, char **_devname) > return devfd; > } > > -static int btrfs_read_adv(int devfd) > -{ > - if (xpread(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) > - != 2 * ADV_SIZE) > - return -1; > - > - return syslinux_validate_adv(syslinux_adv) ? 1 : 0; > -} > - > -stat...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...S_ADV_OFFSET) - != 2 * ADV_SIZE) { - perror("writing adv"); + if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { return 1; } dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); @@ -1418,59 +1468,6 @@ static int open_device(const char *path, struct stat *st, char **_devname) return devfd; } -static int btrfs_read_adv(int devfd) -{ - if (xpread(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) - != 2 * ADV_SIZE) - return -1; - - return syslinux_validate_adv(syslinux_adv) ? 1 : 0; -} - -static inline int xfs_read_adv(int devfd) -{ - const size_t adv_...
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
...??? perror("writing adv"); > +? ? if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { >? ??? return 1; >? ? ? } >? ? ? dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); > @@ -1415,59 +1465,6 @@ static int open_device(const char *path, struct stat > *st, char **_devname) >? ? ? return devfd; >? } > > -static int btrfs_read_adv(int devfd) > -{ > -? ? if (xpread(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) > -??? != 2 * ADV_SIZE) > -??? return -1; > - > -? ? return syslinux_validate_adv(syslinux_adv) ? 1 : 0; > -} > - >...
2015 Nov 15
4
[patch] 6.03 extlinux/main.c typos
On Fri, Nov 13, 2015 at 06:14:36AM +0100, Geert Stappers via Syslinux wrote: > On Fri, Nov 13, 2015 at 05:05:26AM +0200, Ady via Syslinux wrote: > > diff U3 syslinux-6.03/extlinux/main.c syslinux-6.03_typo/extlinux/main.c > > --- syslinux-6.03/extlinux/main.c Mon Oct 06 16:27:44 2014 > > +++ syslinux-6.03_typo/extlinux/main.c Fri Nov 13 02:29:56 2015 > > patch seen >
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.
...reak; + } + + 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
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...v == dev) { + done = true; + break; + } case NONE: break; } + if (done) { devname = strdup(mnt->mnt_fsname); break; } } + endmntent(mtab); return devname; @@ -1098,6 +1246,7 @@ static int open_device(const char *path, struct stat *st, const char **_devname) fprintf(stderr, "%s: statfs %s: %s\n", program, path, strerror(errno)); return -1; } + if (sfs.f_type == EXT2_SUPER_MAGIC) fs_type = EXT2; else if (sfs.f_type == BTRFS_SUPER_MAGIC) @@ -1106,10 +1255,13 @@ static int open_device(const char *path, struct stat *st, cons...