Displaying 13 results from an estimated 13 matches for "ext_read_adv".
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 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 | 113 +++++++++++++++++++++++++++-----------------------------...
2015 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...ar **_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 adv_size = 2 * ADV_SIZE;
- if (xpread(devfd, syslinux_adv, adv_size, boot_image_len) != adv_size)
- return -1;
+ if (xpread(devfd, syslinux_adv, adv_size, offset) != adv_size)
+ return -1;
return syslinux_validate_adv(syslinux...
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>
> ---
> extlinux/main.c | 113
> +++++++++++++++++++...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...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 Alcantara <pcacjr at zytor.com>
---
extlinux/main.c | 1...
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>
> ---
>? extlinux/main.c | 113
> +++++++++++++++++++...
2015 Nov 26
1
[PATCH] extlinux: code cleanup and simplification
> On Fri, 13 Nov 2015 20:35:29 +0100
> Nicolas Cornu via Syslinux <syslinux at zytor.com> wrote:
>
> > 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/...
2014 Dec 24
0
[PATCH 1/8] extlinux/main.c: support unmounted ext2/3/4 filesystem
..."%s: no previous syslinux boot sector found\n",
@@ -1469,29 +1487,38 @@ static int install_loader(const char *path, int update_only)
return 1;
}
- /* Read a pre-existing ADV, if already installed */
- if (opt.reset_adv) {
- syslinux_reset_adv(syslinux_adv);
- } else if (ext_read_adv(path, devfd, NULL) < 0) {
- close(devfd);
- return 1;
- }
+ if S_ISDIR(st.st_mode) {
+ /* Read a pre-existing ADV, if already installed */
+ if (opt.reset_adv) {
+ syslinux_reset_adv(syslinux_adv);
+ } else if (ext_read_adv(path, devfd, NULL) < 0) {
+...
2015 Nov 26
0
[PATCH] extlinux: code cleanup and simplification
On Fri, 13 Nov 2015 20:35:29 +0100
Nicolas Cornu via Syslinux <syslinux at zytor.com> wrote:
> 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 | 113
> +++++++++++++++++...
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...e = UFS2;
if (!fs_type) {
fprintf(stderr,
- "%s: not a fat, ntfs, ext2/3/4, btrfs or xfs filesystem: %s\n",
+ "%s: not a fat, ntfs, ext2/3/4, btrfs, xfs or"
+ "ufs1/2 filesystem: %s\n",
program, path);
return -1;
}
@@ -1382,8 +1422,8 @@ 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 */
+ if (fs_type == BTRFS || fs_type == UFS2) {
+ /* btrfs/ufs2 "ldlinux.sys" is in 64k blank area */
return bt...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...e = UFS2;
if (!fs_type) {
fprintf(stderr,
- "%s: not a fat, ntfs, ext2/3/4, btrfs or xfs filesystem: %s\n",
+ "%s: not a fat, ntfs, ext2/3/4, btrfs, xfs or"
+ "ufs1/2 filesystem: %s\n",
program, path);
return -1;
}
@@ -1382,8 +1418,8 @@ 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 */
+ if (fs_type == BTRFS || fs_type == UFS2) {
+ /* btrfs/ufs2 "ldlinux.sys" is in 64k blank area */
return bt...
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
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...ux_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_adv) ? 1 : 0;
+}
+
static int ext_read_adv(const char *path, int devfd, const char **namep)
{
int err;
@@ -1151,6 +1313,9 @@ static int ext_read_adv(const char *path, int devfd, const char **namep)
if (fs_type == BTRFS) {
/* btrfs "ldlinux.sys" is in 64k blank area */
return btrfs_read_adv(devfd);
+ } else if (fs...