Displaying 20 results from an estimated 22 matches for "xpread".
Did you mean:
spread
2015 Nov 10
2
[PATCH] mtools: Remove local xpread/xpwrite, use ones from syslxcom
..."syslxfs.h"
+#include "syslxcom.h"
-char *program; /* Name of program */
pid_t mypid;
void __attribute__ ((noreturn)) die(const char *msg)
@@ -59,63 +59,6 @@ void __attribute__ ((noreturn)) die_err(const char *msg)
}
/*
- * read/write wrapper functions
- */
-ssize_t xpread(int fd, void *buf, size_t count, off_t offset)
-{
- char *bufp = (char *)buf;
- ssize_t rv;
- ssize_t done = 0;
-
- while (count) {
- rv = pread(fd, bufp, count, offset);
- if (rv == 0) {
- die("short read");
- } else if (rv == -1) {
- if (errno == EINTR) {
- continue...
2015 Nov 10
0
[PATCH] mtools: Remove local xpread/xpwrite, use ones from syslxcom
On Tue, 10 Nov 2015 14:51:04 +0100
Nicolas Cornu via Syslinux <syslinux at zytor.com> wrote:
> From: Nicolas Cornu <ncornu at aldebaran.com>
>
> ---
> mtools/Makefile | 1 +
> mtools/syslinux.c | 59
> +------------------------------------------------------ 2 files
> changed, 2 insertions(+), 58 deletions(-)
Applied. Please, next time make sure you
2015 Nov 11
1
[PATCH] mtools: Remove local xpread/xpwrite, use ones from syslxcom
2015-11-10 23:18 UTC+01:00, Paulo Alcantara via Syslinux <syslinux at zytor.com>:
> On Tue, 10 Nov 2015 14:51:04 +0100
> Nicolas Cornu via Syslinux <syslinux at zytor.com> wrote:
>
>> From: Nicolas Cornu <ncornu at aldebaran.com>
>>
>> ---
>> mtools/Makefile | 1 +
>> mtools/syslinux.c | 59
>>
2015 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...s(-)
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 adv_size = 2 * ADV_SIZE;
-...
2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
...dex 6871fb1..a2a396a 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
return rv;
}
+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, offset) != 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;
+ const char *name;
+
+ if (fs_type == BTRFS) {
+ /* btrfs "ldl...
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
...; +++ b/extlinux/main.c
> @@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char
> *dir, int devfd)
> return rv;
> }
>
> +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, offset) != 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;
> + const char *name;
> +...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...dex a715963..a7ebd49 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
return rv;
}
+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, offset) != 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;
+ const char *name;
+
+ if (fs_type == BTRFS) {
+ /* btrfs "ldl...
2019 Sep 01
11
[nbdkit PATCH 00/10] Avoid -Wshadow
While working on can_FOO caching, at one point I got confused by
whether 'readonly' meant the global set by -r or a local passed to
.open(). A quick attempt to compile with -Wshadow found several other
confusing points; this series gets us to the point that we can add
-Wshadow to builds with --enable-gcc-warnings.
Eric Blake (10):
server: Avoid -Wshadow warnings
guestfs: Avoid
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
...; +++ b/extlinux/main.c
> @@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char
> *dir, int devfd)
>? ? ? return rv;
>? }
>
> +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, offset) != 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;
> +? ? const char *name;
> +...
2011 Apr 15
0
[GIT PULL] syslinux command-line
...1;
}
-/*
- * SYSLINUX installs the string 'SYSLINUX' at offset 3 in the boot
- * sector; this is consistent with FAT filesystems. Earlier versions
- * would install the string "EXTLINUX" 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...
2019 Jan 22
1
[PATCH] fix build failure when CONFIG_KLIBC_ZLIB is not set
...4
--- a/usr/kinit/initrd.c
+++ b/usr/kinit/initrd.c
@@ -54,11 +54,14 @@ static int rd_copy_image(const char *path)
{
int ffd = open(path, O_RDONLY);
int rv = -1;
+#ifdef CONFIG_KLIBC_ZLIB
unsigned char gzip_magic[2];
+#endif
if (ffd < 0)
goto barf;
+#ifdef CONFIG_KLIBC_ZLIB
if (xpread(ffd, gzip_magic, 2, 0) == 2 &&
gzip_magic[0] == 037 && gzip_magic[1] == 0213) {
FILE *wfd = fopen("/dev/ram0", "w");
@@ -67,6 +70,9 @@ static int rd_copy_image(const char *path)
rv = load_ramdisk_compressed(path, wfd, 0);
fclose(wfd);
} else {
+#...
2013 May 30
0
Possible bug in ext_read_adv
...if (namep)
*namep = name;
return err;
}
}
beside the name is quite confusing (ext from extlinux and ext from
ext2/3 filesystem), for XFS code xfs_read_adv is called which is
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;
}
boot_image_len for me is about 53 kb so it read after 53 kb after start
of partition however comment on ext_read_adv state that 2kb is used.
Also in ext_write_a...
2002 Jun 23
1
Using MTOOLS in place of loopback mounting
...eate fresh image
$MCOPY ldlinux.sys $LETTER:
# values from syslinux.c (calculated and converted to base 10);
# these are the offset and length of the portion of the boot sector
# which stays the same and is not to be altered by copying in the
# SYSLINUX boot sector.
BSCOPYSTART=11
BSCOPYLEN=51
# xpread(dev_fd, sectbuf, 512, offset);
# memcpy(bootsect+bsCopyStart, sectbuf+bsCopyStart, bsCopyLen);
# xpwrite(dev_fd, bootsect, 512, offset);
$DD if=$IMAGE of=$TEMP bs=512 count=1
$DD conv=notrunc if=ldlinux.bss of=$IMAGE bs=512 count=1
$DD conv=notrunc if=$TEMP of=$IMAGE bs=1 seek=$BSCOPYSTART skip=$BS...
2012 Aug 02
0
[PATCH 1/3] ALPHA: make sector size dynamic in extlinux
...0;
- return sectmap_fib(fd, sectors, nsectors);
+ return sectmap_fib(fd, sectors, nsectors, sector_size);
}
/*
diff --git a/libinstaller/syslxcom.h b/libinstaller/syslxcom.h
index 8b3b461..111b634 100644
--- a/libinstaller/syslxcom.h
+++ b/libinstaller/syslxcom.h
@@ -8,7 +8,7 @@ ssize_t xpread(int fd, void *buf, size_t count, off_t offset);
ssize_t xpwrite(int fd, const void *buf, size_t count, off_t offset);
void clear_attributes(int fd);
void set_attributes(int fd);
-int sectmap(int fd, sector_t *sectors, int nsectors);
+int sectmap(int fd, sector_t *sectors, int nsectors, unsigned...
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello,
Happy New Year!
These patches make syslinux/linux support ext2/3/4, and it doesn't
require the root privilege, I'd like to add a separate e2fs/syslinux, if
that is more appropriate, it should be easy to do that.
I put these patches on github so that you can easily get them in case
you'd like to test them. (The repo's name is sys_tmp, which avoids
confusing others, I will
2007 Sep 03
2
[git patch] minor fixes
hello hpa,
have been sitting too long on them, nothing exciting, please pull:
git pull git://brane.itp.tuwien.ac.at/~mattems/klibc.git maks
with the following shortlog:
maximilian attems (8):
[klibc] grp.h: Add declaration of getgrgid(), getgrnam()
[klibc] getgrgid, getgrnam include grp.h
[klibc] getpwnam, getpwuid include pwd.h
[klibc] ctype.h declare char classification
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...int install_bootblock(int fd, const char *device)
ok = true;
}
+ } else if (fs_type == UFS1 || fs_type == UFS2) {
+ uint32_t sblock_off = (fs_type == UFS1) ?
+ SBLOCK_UFS1 : SBLOCK_UFS2;
+ uint32_t ufs_smagic = (fs_type == UFS1) ?
+ UFS1_SUPER_MAGIC : UFS2_SUPER_MAGIC;
+
+ if (xpread(fd, &sb6, sizeof sb6, sblock_off) != sizeof sb6) {
+ perror("reading superblock");
+ return 1;
+ }
+
+ if (sb6.fs_magic == ufs_smagic)
+ ok = true;
}
if (!ok) {
fprintf(stderr,
- "no fat, ntfs, ext2/3/4, btrfs or xfs superblock found on %s\n",
+ "no f...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...int install_bootblock(int fd, const char *device)
ok = true;
}
+ } else if (fs_type == UFS1 || fs_type == UFS2) {
+ uint32_t sblock_off = (fs_type == UFS1) ?
+ SBLOCK_UFS1 : SBLOCK_UFS2;
+ uint32_t ufs_smagic = (fs_type == UFS1) ?
+ UFS1_SUPER_MAGIC : UFS2_SUPER_MAGIC;
+
+ if (xpread(fd, &sb6, sizeof sb6, sblock_off) != sizeof sb6) {
+ perror("reading superblock");
+ return 1;
+ }
+
+ if (sb6.fs_magic == ufs_smagic)
+ ok = true;
}
if (!ok) {
fprintf(stderr,
- "no fat, ntfs, ext2/3/4, btrfs or xfs superblock found on %s\n",
+ "no f...
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.
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