Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: util/mtp-hotplug.c

Issue 2364793002: Revert "Uprev libmtp to 1.1.12" (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libmtp@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/Makefile.in ('k') | util/mtp-probe.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mtp-hotplug.c
diff --git a/util/mtp-hotplug.c b/util/mtp-hotplug.c
index 8e118ae0a5d61f7c2402c5180905fa912e278397..a4cec86b6b921319fc9f0789211ba8791556fbca 100644
--- a/util/mtp-hotplug.c
+++ b/util/mtp-hotplug.c
@@ -29,7 +29,6 @@
static void usage(void)
{
fprintf(stderr, "usage: hotplug [-u -H -i -a\"ACTION\"] -p\"DIR\" -g\"GROUP\" -m\"MODE\"\n");
- fprintf(stderr, " -w: use hwdb syntax\n");
fprintf(stderr, " -u: use udev syntax\n");
fprintf(stderr, " -o: use old udev syntax\n");
fprintf(stderr, " -H: use hal syntax\n");
@@ -46,8 +45,7 @@ enum style {
style_udev,
style_udev_old,
style_hal,
- style_usbids,
- style_hwdb
+ style_usbids
};
int main (int argc, char **argv)
@@ -75,7 +73,7 @@ int main (int argc, char **argv)
char *udev_group= NULL;
char *udev_mode = NULL;
- while ( (opt = getopt(argc, argv, "wuoiHa:p:g:m:")) != -1 ) {
+ while ( (opt = getopt(argc, argv, "uoiHa:p:g:m:")) != -1 ) {
switch (opt) {
case 'a':
udev_action = strdup(optarg);
@@ -92,9 +90,6 @@ int main (int argc, char **argv)
case 'i':
style = style_usbids;
break;
- case 'w':
- style = style_hwdb;
- break;
case 'p':
strncpy(mtp_probe_dir,optarg,sizeof(mtp_probe_dir));
mtp_probe_dir[sizeof(mtp_probe_dir)-1] = '\0';
@@ -159,8 +154,6 @@ int main (int argc, char **argv)
printf("ATTR{idVendor}==\"0cf3\", GOTO=\"libmtp_rules_end\"\n");
printf("# Sensitive Atmel JTAG programmers\n");
printf("ATTR{idVendor}==\"03eb\", GOTO=\"libmtp_rules_end\"\n");
- printf("# Sensitive Philips device\n");
- printf("ATTR{idVendor}==\"0471\", ATTR{idProduct}==\"083f\", GOTO=\"libmtp_rules_end\"\n");
break;
case style_udev_old:
printf("# UDEV-style hotplug map for libmtp\n");
@@ -185,9 +178,6 @@ int main (int argc, char **argv)
printf("# usb.ids style device list from libmtp\n");
printf("# Compare: http://www.linux-usb.org/usb.ids\n");
break;
- case style_hwdb:
- printf("# hardware database file for libmtp supported devices\n");
- break;
}
for (i = 0; i < numentries; i++) {
@@ -206,7 +196,7 @@ int main (int argc, char **argv)
printf("# %s %s\n", entry->vendor, entry->product);
printf("libmtp.sh 0x0003 0x%04x 0x%04x 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000\n", entry->vendor_id, entry->product_id);
break;
- case style_hal:
+ case style_hal:
printf(" <!-- %s %s -->\n", entry->vendor, entry->product);
printf(" <match key=\"usb.vendor_id\" int=\"0x%04x\">\n", entry->vendor_id);
printf(" <match key=\"usb.product_id\" int=\"0x%04x\">\n", entry->product_id);
@@ -241,19 +231,12 @@ int main (int argc, char **argv)
printf(" </match>\n");
printf(" </match>\n");
break;
- case style_usbids:
+ case style_usbids:
if (last_vendor != entry->vendor_id) {
printf("%04x\n", entry->vendor_id);
}
printf("\t%04x %s %s\n", entry->product_id, entry->vendor, entry->product);
break;
- case style_hwdb:
- printf("# %s %s\n", entry->vendor, entry->product);
- printf("usb:v%04xp%04x*\n", entry->vendor_id, entry->product_id);
- printf(" ID_MEDIA_PLAYER=1\n");
- printf(" ID_MTP_DEVICE=1\n");
- printf("\n");
- break;
}
last_vendor = entry->vendor_id;
}
@@ -265,7 +248,6 @@ int main (int argc, char **argv)
// Then the footer.
switch (style) {
case style_usbmap:
- case style_hwdb:
break;
case style_udev:
case style_udev_old:
« no previous file with comments | « util/Makefile.in ('k') | util/mtp-probe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698