search for: leshort

Displaying 3 results from an estimated 3 matches for "leshort".

Did you mean: le_short
2014 Jun 03
2
Re: libguestfs supermin error
Hi Rich But there is no src/kernel.ml file on my ubuntu powerpc to which the above patch is reffering. I have installed supermin as supermin_5.1.8-2_powerpc.deb debian package. Thanks On Tue, Jun 3, 2014 at 7:16 PM, Richard W.M. Jones <rjones@redhat.com> wrote: > On Tue, Jun 03, 2014 at 06:55:49PM +0530, abhishek jain wrote: > > supermin: failed to find a suitable kernel
2014 Jun 04
2
Re: libguestfs supermin error
...the version can't > * be found. > * > * See ftp://ftp.astron.com/pub/file/file-<ver>.tar.gz > * (file-<ver>/magic/Magdir/linux) for the rules used to find the > * version number: > * 514 string HdrS Linux kernel > * >518 leshort >0x1ff > * >>(526.s+0x200) string >\0 version %s, > * > * Bugs: probably limited to x86 kernels. > *) > and get_kernel_version_from_file file = > try > let chan = open_in file in > let buf = read_string chan 514 4 in > if buf <>...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...E, errno, "close: %s", from); - - if (close (fd2) == -1) - error (EXIT_FAILURE, errno, "close: %s", to); - } -} - -/* Read an unsigned little endian short at a specified offset in a file. - * Returns a non-negative int on success or -1 on failure. - */ -static int -read_leshort (FILE* fp, int offset) -{ - char buf[2]; - if (fseek (fp, offset, SEEK_SET) != 0 || - fread (buf, sizeof(char), 2, fp) != 2) - { - return -1; - } - return ((buf[1] & 0xFF) << 8) | (buf[0] & 0xFF); -} - -/* Extract the kernel version from a Linux kernel file. - * Returns a...