+2007-08-27 Martin Mares <mj@ucw.cz>
+
+ * lib/names.c (pci_open): When calling gzopen(), use "rb" file mode
+ instead of "r". This is needed on DOS systems, where this function
+ somewhat illogically uses the binary flag for the compressed file
+ instead of the decompressed stream inside, where binariness really
+ matters.
+
2007-08-14 Martin Mares <mj@ucw.cz>
* lspci.c (show_ht): Added decoding of Hypertransport MSI mapping capability,
/*
* The PCI Library -- ID to Name Translation
*
- * Copyright (c) 1997--2006 Martin Mares <mj@ucw.cz>
+ * Copyright (c) 1997--2007 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
size_t len;
char *new_name;
- result = gzopen(a->id_file_name, "r");
+ result = gzopen(a->id_file_name, "rb");
if (result)
return result;
len = strlen(a->id_file_name);
memcpy(new_name, a->id_file_name, len - 3);
new_name[len - 3] = 0;
pci_set_name_list_path(a, new_name, 1);
- return gzopen(a->id_file_name, "r");
+ return gzopen(a->id_file_name, "rb");
}
#define pci_close(f) gzclose(f)