search for: open_device

Displaying 20 results from an estimated 24 matches for "open_device".

2013 Mar 13
0
[LLVMdev] Linkage question
Hi, We are new in LLVM... We want to execute JIT'ed code that links to functions inside our application For example, the JIT has compiled code like extern void open_device(Device * dev); int foo_bar() { Device dev; ... ; open_device(&dev); ...;} / /where open_device() is a function in our own code, that has initialized and called the ExecutionEngine. Of course when running we get the error message LLVM ERROR: Program used external function open_device which coul...
2015 Sep 10
2
[PATCH v2 1/1] extlinux: fix memory leak
...ic const char *get_devname(const char *path) } atexit(device_cleanup); /* unlink the device node on exit */ - devname = devname_buf; + devname = dupname(devname_buf); } #else @@ -1350,10 +1361,10 @@ static const char *get_devname(const char *path) return devname; } -static int open_device(const char *path, struct stat *st, const char **_devname) +static int open_device(const char *path, struct stat *st, char **_devname) { int devfd; - const char *devname = NULL; + char *devname = NULL; struct statfs sfs; if (st) @@ -1393,11 +1404,10 @@ static int open_device(...
2013 Mar 13
2
[LLVMdev] Linkage question
...ithin a program. - D. 2013/3/13 Vania Joloboff <vania.joloboff at inria.fr> > Hi, > > We are new in LLVM... > We want to execute JIT'ed code that links to functions inside our > application > For example, the JIT has compiled code like > > extern void open_device(Device * dev); > int foo_bar() { Device dev; ... ; open_device(&dev); ...;} > / > /where open_device() is a function in our own code, that > has initialized and called the ExecutionEngine. > Of course when running we get the error message > > LLVM ERROR: Program used extern...
2015 Sep 09
1
[PATCH v1 1/1] extlinux: fix memory leak
...e = find_device_sysfs(st.st_dev); + devname = dupname(find_device_sysfs(st.st_dev)); fprintf(stderr, "%s: cannot find device for path %s\n", program, path); return devname; @@ -1350,10 +1361,10 @@ static const char *get_devname(const char *path) return devname; } -static int open_device(const char *path, struct stat *st, const char **_devname) +static int open_device(const char *path, struct stat *st, char **_devname) { int devfd; - const char *devname = NULL; + char *devname = NULL; struct statfs sfs; if (st) @@ -1393,11 +1404,10 @@ static int open_device(...
2013 Mar 12
4
[LLVMdev] LNT BenchmarkGame
On Tue, Mar 12, 2013 at 9:19 AM, Renato Golin <renato.golin at linaro.org>wrote: > On 12 March 2013 15:28, Hal Finkel <hfinkel at anl.gov> wrote: > >> Can't we just paste in a RNG so that we'll get the same output on all >> systems (and can still use the reference output)? >> > > We can, though other tests suffer from the same issue. Would be good
2015 Sep 11
0
[PATCH v2 1/1] extlinux: fix memory leak
...atexit(device_cleanup); /* unlink the device node on > exit */ > - devname = devname_buf; > + devname = dupname(devname_buf); > } > > #else > @@ -1350,10 +1361,10 @@ static const char *get_devname(const char > *path) return devname; > } > > -static int open_device(const char *path, struct stat *st, const char > **_devname) +static int open_device(const char *path, struct stat > *st, char **_devname) { > int devfd; > - const char *devname = NULL; > + char *devname = NULL; > struct statfs sfs; > > if (st) > @@...
2015 Sep 09
0
[PATCH v1 1/1] extlinux: fix memory leak
...e = find_device_sysfs(st.st_dev); + devname = dupname(find_device_sysfs(st.st_dev)); fprintf(stderr, "%s: cannot find device for path %s\n", program, path); return devname; @@ -1350,10 +1361,10 @@ static const char *get_devname(const char *path) return devname; } -static int open_device(const char *path, struct stat *st, const char **_devname) +static int open_device(const char *path, struct stat *st, char **_devname) { int devfd; - const char *devname = NULL; + char *devname = NULL; struct statfs sfs; if (st) @@ -1393,11 +1404,10 @@ static int open_device(...
2013 Mar 13
0
[LLVMdev] Linkage question
...ff at inria.fr > <mailto:vania.joloboff at inria.fr>> > > Hi, > > We are new in LLVM... > We want to execute JIT'ed code that links to functions inside our > application > For example, the JIT has compiled code like > > extern void open_device(Device * dev); > int foo_bar() { Device dev; ... ; open_device(&dev); ...;} > / > /where open_device() is a function in our own code, that > has initialized and called the ExecutionEngine. > Of course when running we get the error message > > LLVM ER...
2001 Jan 02
0
ogg123: close_dsp_on_suspend and next_on_SIGUSR1 patches submission
...ri Dec 29 07:55:25 2000 @@ -27,6 +27,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <signal.h> #include <sys/socket.h> /* !!! */ #include <sys/types.h> #include <unistd.h> @@ -198,6 +199,57 @@ return -1; } +void +open_devices(void) +{ + int bits, rate, channels; + devices *current; + + /* Open all of the devices */ + bits = 16; + rate = 44100; + channels = 2; + current = param.outdevices; + + if (param.quiet < 1) + fprintf(stderr, "Opening devices...\n"); + + while (current != NULL) { + ao_in...
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
...ngrong <xiaoguangrong@cn.fujitsu.com> --- fs/btrfs/volumes.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c..69fc902 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -631,6 +631,7 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, list_add(&device->dev_alloc_list, &fs_devices->alloc_list); } + brelse(bh); continue; error_brelse: -- 1.7.4.4
2014 Dec 24
0
[PATCH 1/8] extlinux/main.c: support unmounted ext2/3/4 filesystem
...t devfd) return write_adv(path, cfg); } -static int install_loader(const char *path, int update_only) +static int install_loader(const char *path, int update_only, struct stat st) { - struct stat st, fst; + struct stat fst; int devfd, rv; const char *devname; - devfd = open_device(path, &st, &devname); - if (devfd < 0) - return 1; + /* Support dir, ext2, ext3 and ext4 filesystem (device or file block) */ + if S_ISDIR(st.st_mode) { + devfd = open_device(path, &st, &devname); + if (devfd < 0) + return 1; + } else if (S...
2015 Nov 12
1
[PATCH] Unification of ext_(write/read)_adv
...ac76 at yahoo.fr> --- extlinux/main.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) 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 in...
2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
...if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) - != 2 * ADV_SIZE) { - perror("writing adv"); + if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { return 1; } dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); @@ -1415,59 +1465,6 @@ 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 in...
2015 Nov 15
0
[PATCH] extlinux/main.c: space chance
...unction return * * 0-> path exists but it is not a subvolume - * * 1-> path exists and it is a subvolume + * * 1-> path exists and it is a subvolume * * -1 -> path is unaccessible * */ static int test_issubvolume(char *path) @@ -1385,8 +1385,8 @@ static int open_device(const char *path, struct stat *st, char **_devname) if (!fs_type) { fprintf(stderr, - "%s: not a fat, ntfs, ext2/3/4, btrfs, xfs or" - "ufs1/2 filesystem: %s\n", + "%s: not a fat, ntfs, ext2/3/4, btrfs, xfs" + " or ufs1/2 filesystem: %s\n", pr...
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
...2 * ADV_SIZE, BTRFS_ADV_OFFSET) > - != 2 * ADV_SIZE) { > - perror("writing adv"); > + if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { > return 1; > } > dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); > @@ -1415,59 +1465,6 @@ 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_valid...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...if (xpwrite(devfd, syslinux_adv, 2 * ADV_SIZE, BTRFS_ADV_OFFSET) - != 2 * ADV_SIZE) { - perror("writing adv"); + if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { return 1; } dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); @@ -1418,59 +1468,6 @@ 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 in...
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
...SIZE, BTRFS_ADV_OFFSET) > -??? != 2 * ADV_SIZE) { > -??? perror("writing adv"); > +? ? if (ext_write_adv_offset(devfd, BTRFS_ADV_OFFSET)) { >? ??? return 1; >? ? ? } >? ? ? dprintf("write adv to 0x%x\n", BTRFS_ADV_OFFSET); > @@ -1415,59 +1465,6 @@ 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...
2015 Nov 15
4
[patch] 6.03 extlinux/main.c typos
On Fri, Nov 13, 2015 at 06:14:36AM +0100, Geert Stappers via Syslinux wrote: > On Fri, Nov 13, 2015 at 05:05:26AM +0200, Ady via Syslinux wrote: > > diff U3 syslinux-6.03/extlinux/main.c syslinux-6.03_typo/extlinux/main.c > > --- syslinux-6.03/extlinux/main.c Mon Oct 06 16:27:44 2014 > > +++ syslinux-6.03_typo/extlinux/main.c Fri Nov 13 02:29:56 2015 > > patch seen >
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
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...,7 @@ static const char *get_devname(const char *path) fprintf(stderr, "%s: cannot create device %s\n", program, devname); return devname; } - + atexit(device_cleanup); /* unlink the device node on exit */ devname = devname_buf; } @@ -1330,10 +1365,15 @@ static int open_device(const char *path, struct stat *st, const char **_devname) fs_type = NTFS; else if (sfs.f_type == XFS_SUPER_MAGIC) fs_type = XFS; + else if (sfs.f_type == UFS1_SUPER_MAGIC) + fs_type = UFS1; + else if (sfs.f_type == UFS2_SUPER_MAGIC) + fs_type = UFS2; if (!fs_type) { fprintf(...