From: Lonnie Mendez <lmendez19@austin.rr.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Large USB-Patch Documentation and todays CVS patch
Date: Thu, 27 Apr 2006 08:29:51 -0500 [thread overview]
Message-ID: <4450C74F.7030304@austin.rr.com> (raw)
In-Reply-To: <5583.1146131284@www031.gmx.net>
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
Johannes Schindelin wrote:
>>>Also, you rename some things when it has no apparent use to rename them,
>>>such as usb_device_add, or product_name.
>>>
>>>
>>>
>>Sorry but on that point you say things which are in no case provable by
>>any study.
>>
>>
>
>Also kindly look into line 1417 and 1419 of your patch. You will find the
>renaming o f product_name to prod_name.
>
That was my doing.
manufacturer_name
product_name
I have a habit of making related variables short and uniform in length.
[-- Attachment #2: qemu-usb-linux-vars.diff --]
[-- Type: text/plain, Size: 5038 bytes --]
--- qemu/usb-linux.c 2006-04-27 08:18:38.000000000 -0500
+++ qemu/usb-linux.c 2006-04-27 08:26:04.000000000 -0500
@@ -44,9 +44,9 @@
typedef int USBScanFunc(void *opaque, int bus_num, int addr,
int vendor_id, int product_id,
- const char *spec_version,
- const char *manf_string,
- const char *prod_string);
+ const char *specification_version,
+ const char *manufacturer_string,
+ const char *product_string);
static int usb_host_find_device(int *pbus_num, int *paddr,
const char *devname);
int usb_host_handle_close(USBDevice *opaque);
@@ -282,9 +282,9 @@
char buf[1024];
int bus_num, addr, device_count, product_id, vendor_id;
int ret;
- char manf_name[512];
- char prod_name[512];
- char spec_version[6];
+ char manufacturer_name[512];
+ char product_name[512];
+ char specification_version[6];
f = fopen(USBDEVFS_PATH "/devices", "r");
if (!f) {
@@ -303,7 +303,7 @@
if (device_count && (vendor_id || product_id)) {
/* New device. Add the previously discovered device. */
ret = func(opaque, bus_num, addr, vendor_id, product_id,
- spec_version, manf_name, prod_name);
+ specification_version, manufacturer_name, product_name);
if (ret)
goto the_end;
}
@@ -313,9 +313,9 @@
if (get_tag_value(buf, sizeof(buf), line, "Dev#=", " ") < 0)
goto fail;
addr = atoi(buf);
- strcpy(spec_version, "01.10");
- strcpy(manf_name, "unknown");
- strcpy(prod_name, "unknown");
+ strcpy(specification_version, "01.10");
+ strcpy(manufacturer_name, "unknown");
+ strcpy(product_name, "unknown");
device_count++;
product_id = 0;
vendor_id = 0;
@@ -323,7 +323,7 @@
if (get_tag_value(&buf[1], sizeof(buf) - 1, line, "Ver=", " ") < 0)
goto fail;
buf[0] = '0';
- pstrcpy(spec_version, sizeof(spec_version), buf);
+ pstrcpy(specification_version, sizeof(specification_version), buf);
} else if (line[0] == 'P' && line[1] == ':') {
if (get_tag_value(buf, sizeof(buf), line, "Vendor=", " ") < 0)
goto fail;
@@ -336,18 +336,18 @@
if (get_tag_value(buf, sizeof(buf), line, "Product=", "") < 0) {
goto fail;
} else {
- pstrcpy(prod_name, sizeof(prod_name), buf);
+ pstrcpy(product_name, sizeof(product_name), buf);
}
} else {
- pstrcpy(manf_name, sizeof(manf_name), buf);
+ pstrcpy(manufacturer_name, sizeof(manufacturer_name), buf);
}
}
fail: ;
}
if (device_count && (vendor_id || product_id)) {
/* Add the last device. */
- ret = func(opaque, bus_num, addr, vendor_id, product_id, spec_version,
- manf_name, prod_name);
+ ret = func(opaque, bus_num, addr, vendor_id, product_id,
+ specification_version, manufacturer_name, product_name);
}
the_end:
fclose(f);
@@ -363,9 +363,9 @@
static int usb_host_find_device_scan(void *opaque, int bus_num, int addr,
int vendor_id, int product_id,
- const char *spec_version,
- const char *manf_string,
- const char *prod_string)
+ const char *specification_version,
+ const char *manufacturer_string,
+ const char *product_string)
{
FindDeviceState *s = opaque;
if (vendor_id == s->vendor_id &&
@@ -408,14 +408,14 @@
static int usb_host_info_device(void *opaque, int bus_num, int addr,
int vendor_id, int product_id,
- const char *spec_ver,
- const char *manf_string,
- const char *prod_string)
+ const char *specification_version,
+ const char *manufacturer_string,
+ const char *product_string)
{
term_printf(" Device host:%03d:%03d, Manufacturer %s, Product %s\n",
- bus_num, addr, manf_string, prod_string );
+ bus_num, addr, manufacturer_string, product_string );
term_printf(" VendorID:ProductID %04xx%04x, USB-Standard: %s\n",
- vendor_id, product_id, spec_ver );
+ vendor_id, product_id, specification_version );
return 0;
}
next prev parent reply other threads:[~2006-04-27 13:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-26 16:19 [Qemu-devel] Large USB-Patch Documentation and todays CVS patch nix.wie.weg
2006-04-26 22:40 ` Johannes Schindelin
2006-04-27 1:23 ` nix.wie.weg
2006-04-27 8:37 ` andrzej zaborowski
2006-04-27 9:48 ` Johannes Schindelin
2006-04-27 13:29 ` Lonnie Mendez [this message]
2006-04-27 15:30 ` nix.wie.weg
2006-04-27 6:16 ` Lonnie Mendez
2006-04-27 15:45 ` nix.wie.weg
2006-04-28 12:44 ` Joseph Miller
-- strict thread matches above, loose matches on Subject: below --
2007-05-23 11:23 Per Åstrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4450C74F.7030304@austin.rr.com \
--to=lmendez19@austin.rr.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).