search for: install_loader

Displaying 15 results from an estimated 15 matches for "install_loader".

Did you mean: install_header
2014 Dec 24
0
[PATCH 1/8] extlinux/main.c: support unmounted ext2/3/4 filesystem
...nt install_file_to_device(const char *device_path, int devfd, + int update_only) +{ +} + #ifdef __KLIBC__ static char devname_buf[64]; @@ -1452,15 +1459,26 @@ static int ext_write_adv(const char *path, const char *cfg, int devfd) return write_adv(path, cfg); } -static int install_loader(const char *path, int update_only) +static int install_loader(const char *path, int update_only, struct stat st) { - struct stat st, fst; + struct stat fst; int devfd, rv; const char *devname; - devfd = open_device(path, &st, &devname); - if (devfd < 0) - return...
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...d)) { fprintf(stderr, "%s: path %s doesn't match device %s\n", program, path, devname); + free(devname); close(devfd); return -1; } + if (_devname) + *_devname = devname; + else + free(devname); return devfd; } @@ -1468,7 +1483,7 @@ static int install_loader(const char *path, int update_only) { struct stat st, fst; int devfd, rv; - const char *devname; + char *devname = NULL; devfd = open_device(path, &st, &devname); if (devfd < 0) @@ -1508,6 +1523,7 @@ static int install_loader(const char *path, int update_only)...
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix memory leak
...th, devfd)) { fprintf(stderr, "%s: path %s doesn't match device %s\n", program, path, devname); + free(devname); close(devfd); return -1; } + if (_devname) + *_devname = devname; + else + free(devname); return devfd; } @@ -1468,7 +1483,7 @@ static int install_loader(const char *path, int update_only) { struct stat st, fst; int devfd, rv; - const char *devname; + char *devname = NULL; devfd = open_device(path, &st, &devname); if (devfd < 0) @@ -1508,6 +1523,7 @@ static int install_loader(const char *path, int update_only)...
2015 Sep 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...e %s\n", > program, path, devname); > + free(devname); > close(devfd); > return -1; > } > + if (_devname) > + *_devname = devname; > + else > + free(devname); > return devfd; > } > > @@ -1468,7 +1483,7 @@ static int install_loader(const char *path, int > update_only) { > struct stat st, fst; > int devfd, rv; > - const char *devname; > + char *devname = NULL; > > devfd = open_device(path, &st, &devname); > if (devfd < 0) > @@ -1508,6 +1523,7 @@ static int insta...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
..., devfd)) { fprintf(stderr, "%s: path %s doesn't match device %s\n", program, path, devname); + free(devname); close(devfd); return -1; } + if (_devname) + *_devname = devname; + else + free(devname); return devfd; } @@ -1468,7 +1483,7 @@ static int install_loader(const char *path, int update_only) { struct stat st, fst; int devfd, rv; - const char *devname; + char *devname = NULL; devfd = open_device(path, &st, &devname); if (devfd < 0) @@ -1508,6 +1523,7 @@ static int install_loader(const char *path, int update_only)...
2015 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...uot;writing adv"); - return 1; - } - return 0; + if (fs_type == BTRFS) { + /* btrfs "ldlinux.sys" is in 64k blank area */ + return ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET); + } else { + return write_adv(path, cfg); } - return write_adv(path, cfg); } static int install_loader(const char *path, int update_only) -- 2.6.2
2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
...{ - if (fs_type == BTRFS) { /* btrfs "ldlinux.sys" is in 64k blank area */ - if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE, - BTRFS_ADV_OFFSET) != 2 * ADV_SIZE) { - perror("writing adv"); - return 1; - } - return 0; - } - return write_adv(path, cfg); -} - static int install_loader(const char *path, int update_only) { struct stat st, fst; -- 2.6.2
2014 Dec 24
14
[PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem
Hello syslinux, Merry Christmas! These patches will make extlinux work with umounted ext2/3/4 filesystem, for example: $ extlinux -i /dev/sdXN or $ extlinux -i file_block Also it can work with something like: $ extlinux /dev/sdXN --reset-adv or $ extlinux file_block --reset-adv We don't use a new option (I planed to use "-d" but it is already in use), it will check whether the
2008 Jul 03
1
extlinux and install script
...nto /mnt/boot during usb booted system, the extlinux reports the following error. /usr/bin/extlinux -i /mnt/boot /mnt/boot is device proc /usr/bin/extlinux: cannot open device proc But /mnt/boot is mounted on /dev/sda1 and ext3 file system. I read the source code and found the following code in install_loader() if ( (mtab = setmntent("/proc/mounts", "r")) ) { while ( (mnt = getmntent(mtab)) ) { if ( (!strcmp(mnt->mnt_type, "ext2") || !strcmp(mnt->mnt_type, "ext3")) && !stat(mnt->mnt_fsname, &dst) &&...
2011 Apr 15
0
[GIT PULL] syslinux command-line
...t; instead, handle both. - */ -int already_installed(int devfd) -{ - char buffer[8]; - - xpread(devfd, buffer, 8, 3); - return !memcmp(buffer, "SYSLINUX", 8) || !memcmp(buffer, "EXTLINUX", 8); -} - #ifdef __KLIBC__ static char devname_buf[64]; @@ -766,7 +753,7 @@ int install_loader(const char *path, int update_only) if (devfd < 0) return 1; - if (update_only && !already_installed(devfd)) { + if (update_only && !syslinux_already_installed(devfd)) { fprintf(stderr, "%s: no previous syslinux boot sector found\n", program); close(d...
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
...ys" is in 64k blank area */ > - if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE, > - BTRFS_ADV_OFFSET) != 2 * ADV_SIZE) { > - perror("writing adv"); > - return 1; > - } > - return 0; > - } > - return write_adv(path, cfg); > -} > - > static int install_loader(const char *path, int update_only) > { > struct stat st, fst; > -- > 2.6.2 > I guess this patch is a replacement of your former submission: http://www.syslinux.org/archives/2015-November/024554.html Right? When this happen, please state so to ease the reviewing process. Cele...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...{ - if (fs_type == BTRFS) { /* btrfs "ldlinux.sys" is in 64k blank area */ - if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE, - BTRFS_ADV_OFFSET) != 2 * ADV_SIZE) { - perror("writing adv"); - return 1; - } - return 0; - } - return write_adv(path, cfg); -} - static int install_loader(const char *path, int update_only) { struct stat st, fst;
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
...ea */ > -??? if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE, > -??? ??? BTRFS_ADV_OFFSET) != 2 * ADV_SIZE) { > -??? ??? perror("writing adv"); > -??? ??? return 1; > -??? } > -??? return 0; > -? ? } > -? ? return write_adv(path, cfg); > -} > - >? static int install_loader(const char *path, int update_only) >? { >? ? ? struct stat st, fst; > -- > 2.6.2 > I guess this patch is a replacement of your former submission: http://www.syslinux.org/archives/2015-November/024554.html Right? When this happen, please state so to ease the reviewing process. Cele...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...Didn't find it in /proc/mounts, try /etc/mtab */ + devname = find_device("/etc/mtab", st.st_dev); } if (!devname) { fprintf(stderr, "%s: cannot find device for path %s\n", program, path); @@ -837,3 +1076,4 @@ int main(int argc, char *argv[]) return install_loader(opt.directory, opt.update_only); } + -- 1.7.4
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.