search for: read_adv

Displaying 8 results from an estimated 8 matches for "read_adv".

2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
Merge btrfs_read_adv and xfs_read_adv into a single generic function ext_read_adv and split ext_write_adv_offset out of ext_write_adv. Use those new functions in rewrite_boot_image and btrfs_install_file where it is actually hardcoded. Signed-off-by: Nicolas Cornu <nicolac76 at yahoo.fr> --- extlinux/main.c |...
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
2015-11-13 20:35 UTC+01:00, Nicolas Cornu via Syslinux <syslinux at zytor.com>: > Merge btrfs_read_adv and xfs_read_adv into a single generic function > ext_read_adv and split ext_write_adv_offset out of ext_write_adv. > > Use those new functions in rewrite_boot_image and btrfs_install_file > where it is actually hardcoded. > > Signed-off-by: Nicolas Cornu <nicolac76 at yahoo.fr...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...acb87175ea588f2fa11b21331503c4 Author: Nicolas Cornu via Syslinux <syslinux at zytor.com> AuthorDate: Fri, 13 Nov 2015 20:35:29 +0100 Committer: Paulo Alcantara <pcacjr at zytor.com> CommitDate: Wed, 25 Nov 2015 21:58:23 -0200 extlinux: code cleanup and simplification Merge btrfs_read_adv and xfs_read_adv into a single generic function ext_read_adv and split ext_write_adv_offset out of ext_write_adv. Use those new functions in rewrite_boot_image and btrfs_install_file where it is actually hardcoded. Signed-off-by: Nicolas Cornu <nicolac76 at yahoo.fr> Signed-off-by: Paulo Al...
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
Right sorry for that ;) Le Mercredi 18 novembre 2015 7h31, Celelibi <celelibi at gmail.com> a ?crit : 2015-11-13 20:35 UTC+01:00, Nicolas Cornu via Syslinux <syslinux at zytor.com>: > Merge btrfs_read_adv and xfs_read_adv into a single generic function > ext_read_adv and split ext_write_adv_offset out of ext_write_adv. > > Use those new functions in rewrite_boot_image and btrfs_install_file > where it is actually hardcoded. > > Signed-off-by: Nicolas Cornu <nicolac76 at yahoo.fr...
2013 May 30
0
Possible bug in ext_read_adv
Hi, looking at ext_read_adv code (extlinux/main.c) static int ext_read_adv(const char *path, int devfd, const char **namep) { int err; const char *name; if (fs_type == BTRFS) { /* btrfs "ldlinux.sys" is in 64k blank area */ return btrfs_read_adv(devfd); } else if (fs_type == XFS) {...
2015 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...d, 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_offset(int devfd, off_t offset) { const size_t...
2010 Jun 19
1
[PATCH 1/2] linux/syslinux.c: Silence warnings
...ignore it as the string is already tested for null before using it. Signed-off-by: Gene Cumm <gene.cumm at gmail.com> --- diff --git a/libinstaller/setadv.c b/libinstaller/setadv.c index c891b87..e9847e7 100644 --- a/libinstaller/setadv.c +++ b/libinstaller/setadv.c @@ -182,8 +182,9 @@ int read_adv(const char *path, const char *cfg) int fd = -1; struct stat st; int err = 0; + int ret; - asprintf(&file, "%s%s%s", + ret = asprintf(&file, "%s%s%s", path, path[0] && path[strlen(path) - 1] == '/' ? "" : &qu...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...fs_type = XFS; if (!fs_type) { - fprintf(stderr, "%s: not a fat, ntfs, ext2/3/4 or btrfs filesystem: %s\n", + fprintf(stderr, + "%s: not a fat, ntfs, ext2/3/4, btrfs or xfs filesystem: %s\n", program, path); return -1; } @@ -1143,6 +1295,16 @@ static int btrfs_read_adv(int devfd) return syslinux_validate_adv(syslinux_adv) ? 1 : 0; } +static inline int xfs_read_adv(int devfd) +{ + const size_t adv_size = 2 * ADV_SIZE; + + if (xpread(devfd, syslinux_adv, adv_size, boot_image_len) != adv_size) + return -1; + + return syslinux_validate_adv(syslinux_a...