Displaying 8 results from an estimated 8 matches for "btrfs_adv_offset".
2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
...return syslinux_validate_adv(syslinux_adv) ? 1 : 0;
+}
+
+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 ext_read_adv_offset(devfd, BTRFS_ADV_OFFSET);
+ } else if (fs_type == XFS) {
+ /* XFS "ldlinux.sys" is in the first 2048 bytes of the primary AG */
+ return ext_read_adv_offset(devfd, boot_image_len);
+ } else {
+ err = read_adv(path, name = "ldlinux.sys");
+ if (err == 2) /* ldlinux.sys does not exist */
+ err...
2014 May 21
0
[syslinux:master] btrfs: fix typo in definition of BTRFS_ADV_OFFSET
...39;
What can I do to fix it?
> Author: H. Peter Anvin <hpa at linux.intel.com>
> AuthorDate: Tue, 20 May 2014 16:55:10 -0700
> Committer: H. Peter Anvin <hpa at linux.intel.com>
> CommitDate: Tue, 20 May 2014 16:55:10 -0700
>
> btrfs: fix typo in definition of BTRFS_ADV_OFFSET
>
> Correct the macros used in BTRFS_ADV_OFFSET.
>
> Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
>
> ---
> extlinux/main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/extlinux/main.c b/extlinux/main.c
> index 7271...
2015 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...nux/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 adv_size = 2 * ADV_SIZE;
- if (xpread(devfd, syslinux_adv, adv_size, boot_im...
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
...: 0;
> +}
> +
> +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 ext_read_adv_offset(devfd, BTRFS_ADV_OFFSET);
> + } else if (fs_type == XFS) {
> + /* XFS "ldlinux.sys" is in the first 2048 bytes of the primary AG */
> + return ext_read_adv_offset(devfd, boot_image_len);
> + } else {
> + err = read_adv(path, name = "ldlinux.sys");
> + if (err == 2) /* ldlinux.s...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...return syslinux_validate_adv(syslinux_adv) ? 1 : 0;
+}
+
+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 ext_read_adv_offset(devfd, BTRFS_ADV_OFFSET);
+ } else if (fs_type == XFS) {
+ /* XFS "ldlinux.sys" is in the first 2048 bytes of the primary AG */
+ return ext_read_adv_offset(devfd, boot_image_len);
+ } else {
+ err = read_adv(path, name = "ldlinux.sys");
+ if (err == 2) /* ldlinux.sys does not exist */
+ err...
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
...gt; +}
> +
> +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 ext_read_adv_offset(devfd, BTRFS_ADV_OFFSET);
> +? ? } else if (fs_type == XFS) {
> +??? /* XFS "ldlinux.sys" is in the first 2048 bytes of the primary AG */
> +??? return ext_read_adv_offset(devfd, boot_image_len);
> +? ? } else {
> +??? err = read_adv(path, name = "ldlinux.sys");
> +??? if (err == 2)??...
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...nst char *path, const char *cfg, int devfd)
{
- if (fs_type == BTRFS) { /* btrfs "ldlinux.sys" is in 64k blank area */
+ /* btrfs/ufs2 "ldlinux.sys" is in 64k blank area */
+ if (fs_type == BTRFS || fs_type == UFS2) {
if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE,
BTRFS_ADV_OFFSET) != 2 * ADV_SIZE) {
perror("writing adv");
diff --git a/extlinux/ufs.h b/extlinux/ufs.h
new file mode 100644
index 0000000..d324699
--- /dev/null
+++ b/extlinux/ufs.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013 Raphael S. Carvalho <raphael.scarv at gmail.com>
+ *
+ * This program...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...nst char *path, const char *cfg, int devfd)
{
- if (fs_type == BTRFS) { /* btrfs "ldlinux.sys" is in 64k blank area */
+ /* btrfs/ufs2 "ldlinux.sys" is in 64k blank area */
+ if (fs_type == BTRFS || fs_type == UFS2) {
if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE,
BTRFS_ADV_OFFSET) != 2 * ADV_SIZE) {
perror("writing adv");
diff --git a/extlinux/ufs.h b/extlinux/ufs.h
new file mode 100644
index 0000000..d324699
--- /dev/null
+++ b/extlinux/ufs.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013 Raphael S. Carvalho <raphael.scarv at gmail.com>
+ *
+ * This program...