search for: dev_fd

Displaying 14 results from an estimated 14 matches for "dev_fd".

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
2011 Apr 15
0
[GIT PULL] syslinux command-line
...ap_fib(fd, sectors, nsectors); } + +/* + * 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 syslinux_already_installed(int dev_fd) +{ + char buffer[8]; + + xpread(dev_fd, buffer, 8, 3); + return !memcmp(buffer, "SYSLINUX", 8) || !memcmp(buffer, "EXTLINUX", 8); +} diff --git a/libinstaller/syslxcom.h b/libinstaller/syslxcom.h index 39ca09d..bf186ca 100644 --- a/libinstaller/syslxcom.h +++ b/libinst...
2017 Mar 03
2
[PATCH 1/2] Use gnulib set_nonblocking_flag function instead of fcntl.
The previous code: fcntl (fd, F_SETFL, O_NONBLOCK) was technically incorrect, because it would have reset any other flags on the file descriptor. Thanks: Eric Blake --- bootstrap | 1 + daemon/inotify.c | 6 ++++-- lib/conn-socket.c | 21 +++++++++++---------- m4/.gitignore | 9 +++++++++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/bootstrap b/bootstrap
2002 Jun 23
1
Using MTOOLS in place of loopback mounting
...esh 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=$BSCOPYSTA...
2009 Mar 30
0
[PATCH]some changes in linux/syslinux.c
...nux/syslinux.c index 37a54fd..5d38e6f 100644 --- a/linux/syslinux.c +++ b/linux/syslinux.c @@ -316,7 +316,6 @@ void do_umount(const char *mntpath, int cookie) int main(int argc, char *argv[]) { static unsigned char sectbuf[SECTOR_SIZE]; - unsigned char *dp; const unsigned char *cdp; int dev_fd, fd; struct stat st; @@ -498,7 +497,7 @@ int main(int argc, char *argv[]) goto umount; } - dp += nb; + cdp += nb; left -= nb; } -- regards liu Aleaxander
2015 Jul 11
0
EXTLINUX - GCC 5
...#endif ... #if DO_DIRECT_MOUNT { if (!S_ISBLK(st.st_mode)) { /* It's file, need to mount it loopback */ ... int loop_fd; for (n = 0; loop_fd < 0; n++) { ... if (ioctl(loop_fd, LOOP_SET_FD, (void *)dev_fd)) { losetup ioctls have few chance if they get called by random decision. This would be a nice suspect if __KLIBC__ is defined. ----------------------------------------------------------------- [win/syslinux.c:506]: (error) Uninitialized variable: sdn Possibly a false positive. ------------...
2012 Aug 02
0
[PATCH 1/3] ALPHA: make sector size dynamic in extlinux
...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 sector_size); int syslinux_already_installed(int dev_fd); #endif diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c index c706f2c..be101f9 100644 --- a/libinstaller/syslxmod.c +++ b/libinstaller/syslxmod.c @@ -31,7 +31,8 @@ * Generate sector extents */ static void generate_extents(struct syslinux_extent *ex, int nptrs, - const...
2015 Jul 11
3
EXTLINUX - GCC 5
> On Jul 10, 2015 5:29 PM, "poma via Syslinux" <syslinux at zytor.com> wrote: > > > The same as with the ISOLINUX, stable and git. > > Only this time has nothing to do with the menu. > > 1) EXTLINUX is no longer a discrete variant. The installer extlinux now > installs SYSLINUX. > 2) William Kensington already saw a similar behavior wherein an
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...fcntl (fds[0], F_SETFD, FD_CLOEXEC) == -1 || - fcntl (fds[1], F_SETFD, FD_CLOEXEC) == -1) { - perror ("fcntl"); - exit (EXIT_FAILURE); - } + fcntl (fds[1], F_SETFD, FD_CLOEXEC) == -1) + error (EXIT_FAILURE, errno, "fcntl"); data.fd = fds[1]; snprintf (dev_fd, sizeof dev_fd, "/dev/fd/%d", fds[0]); @@ -167,17 +164,13 @@ main (int argc, char *argv[]) data.g = g; data.direction = DIRECTION_DOWN; - if (pipe (fds) == -1) { - perror ("pipe"); - exit (EXIT_FAILURE); - } + if (pipe (fds) == -1) + error (EXIT_FAILURE, errn...
2007 Apr 18
7
[Bridge] (no subject)
Dear Sir, I was trying to install bridge as we are installing scps gateway in our testbed.This requires us to install the bridge. Our Linux version is 2.4.18 ~3 and we are using redhat 7.2 Please let me know which is the bridge I should install and how to configure it. Before configuring the bridge what I should check in my configuration. Thanks for your time, Sincerely Rama ===== I hear
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...est_thread, NULL, start_test_thread, &data); - if (r != 0) { - fprintf (stderr, "pthread_create: %s\n", strerror (r)); - exit (EXIT_FAILURE); - } + if (r != 0) + error (EXIT_FAILURE, r, "pthread_create"); /* Do the upload. */ op_error = guestfs_upload (g, dev_fd, "/upload"); @@ -126,15 +122,11 @@ main (int argc, char *argv[]) /* Kill the test thread and clean up. */ r = pthread_cancel (test_thread); - if (r != 0) { - fprintf (stderr, "pthread_cancel: %s\n", strerror (r)); - exit (EXIT_FAILURE); - } + if (r != 0) + er...
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.
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c