search for: next_device

Displaying 11 results from an estimated 11 matches for "next_device".

Did you mean: net_device
2001 Jan 02
0
ogg123: close_dsp_on_suspend and next_on_SIGUSR1 patches submission
...te,channels, + current->options); + if (current->device == NULL) + { + fprintf(stderr, "Error opening device.\n"); + exit(1); + } + if (param.quiet < 1) + fprintf(stderr, "\n"); // Gotta keep 'em separated ... + + current = current->next_device; + } +} + +void close_devices(void) +{ + devices *current; + + current = param.outdevices; + + while(current != NULL) + { + ao_close(current->device); + current = current->next_device; + } +} + int main (int argc, char **argv) { @@ -207,8 +259,6 @@ int option_index = 1; ao_...
2011 Oct 28
0
[PATCH] Btrfs: don't try to touch sb->s_bdev
...btrfs/volumes.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f2a4cc7..afd6a1e 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1376,8 +1376,6 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) next_device = list_entry(root->fs_info->fs_devices->devices.next, struct btrfs_device, dev_list); - if (device->bdev == root->fs_info->sb->s_bdev) - root->fs_info->sb->s_bdev = next_device->bdev; if (device->bdev == root->fs_info->fs_devices->latest_bdev)...
2007 Feb 16
1
Re: [nut-commits] svn commit r808 - in trunk: . drivers
...> > if (dev->descriptor.iManufacturer) { > ret = usb_get_string_simple(udev, dev->descriptor.iManufacturer, string, sizeof(string)); > @@ -307,6 +309,10 @@ > return rdlen; > > next_device: > + free(curDevice->Vendor); > + free(curDevice->Product); > + free(curDevice->Serial); > + free(curDevice->Bus); > usb_close(udev); >...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...usb_subdriver.hid_rep_index = 2 and libusb_get_config_descriptor returns is -5 (Entity not found), conf_desc is not filled in and then it ends up in this code section: if (!conf_desc) { /* ?? this should never happen */ upsdebugx(2, " Couldn't retrieve descriptors"); goto next_device; } With my hacked in test code to force 0 as the config_index the usbhid-ups driver (and the arduino subdriver) appear happy, I see reports, I see state changes for my AC Present, etc. >From my brief reading about USB it appears to me that the "tree" of descriptors is like this: - A...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...dex = 2 and libusb_get_config_descriptor returns > is -5 (Entity not found), conf_desc is not filled in and then it ends up > in this code section: > if (!conf_desc) { /* ?? this should never happen */ > upsdebugx(2, " Couldn't retrieve descriptors"); > goto next_device; > } > > With my hacked in test code to force 0 as the config_index the usbhid-ups > driver (and the arduino subdriver) appear happy, I see reports, I see state > changes for my AC Present, etc. > > From my brief reading about USB it appears to me that the "tree" of &...
2007 Feb 16
1
Re: [nut-commits] svn commit r808 - in trunk: . drivers
> next_device: > + free(curDevice->Vendor); > + free(curDevice->Product); > + free(curDevice->Serial); > + free(curDevice->Bus); > usb_close(udev); > udev = NULL; > } Wouldn't it be necessary to check whether there is anything to free or not? Vendor, Produ...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...get_config_descriptor returns >> is -5 (Entity not found), conf_desc is not filled in and then it ends up >> in this code section: >> if (!conf_desc) { /* ?? this should never happen */ >> upsdebugx(2, " Couldn't retrieve descriptors"); >> goto next_device; >> } >> >> With my hacked in test code to force 0 as the config_index the usbhid-ups >> driver (and the arduino subdriver) appear happy, I see reports, I see state >> changes for my AC Present, etc. >> >> From my brief reading about USB it appears to me th...
2023 Nov 05
1
Passing hid_rep_index to libusb_get_config_descriptor is wrong?
...r >>> returns is -5 (Entity not found), conf_desc is not filled in and then it >>> ends up in this code section: >>> if (!conf_desc) { /* ?? this should never happen */ >>> upsdebugx(2, " Couldn't retrieve descriptors"); >>> goto next_device; >>> } >>> >>> With my hacked in test code to force 0 as the config_index the >>> usbhid-ups driver (and the arduino subdriver) appear happy, I see reports, >>> I see state changes for my AC Present, etc. >>> >>> From my brief reading a...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...OPEN) { > + /* Asked for reopening the device, but we couldn't > + * get an exact match, so opening instead. */ > + *mode = MODE_OPEN; > + } > + break; > + case 0: > upsdebugx(2, "Device does not match - skipping"); > goto next_device; > - } else if (ret==-1) { > - fatalx(EXIT_FAILURE, "matcher: %s", strerror(errno)); > - goto next_device; > - } else if (ret==-2) { > + case -1: > + fatal_with_errno(EXIT_FAILURE, "matcher"); > + default: > upsdebugx(2, &quo...
2007 Feb 07
2
some megatec-usb issues
...ing is to change it: --- libusb.c (revision 799) +++ libusb.c (working copy) @@ -180,7 +180,7 @@ } else if (ret==-2) { upsdebugx(2, "matcher: unspecified error"); goto next_device; - } + } else if (ret==2) mode = MODE_REOPEN; } upsdebugx(2, "Device matches"); This change is enough, it doesn't affect other drivers and IMHO it makes libusb_open more gene...
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected Signed-off-by: Xiao Guangrong <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