]> mj.ucw.cz Git - pciutils.git/commitdiff
Renamed `net.cache_path' to `net.cache_name', it's more logical.
authorMartin Mares <mj@ucw.cz>
Tue, 12 Feb 2008 08:38:14 +0000 (09:38 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 12 Feb 2008 08:38:14 +0000 (09:38 +0100)
lib/init.c
lib/names-cache.c

index 45c75909cd76d66adf95ff70a0d4cf9b087aebed..737112e30786a277ec5722459f49e6ce514bd4da 100644 (file)
@@ -69,7 +69,7 @@ pci_alloc(void)
   pci_set_name_list_path(a, PCI_PATH_IDS_DIR "/" PCI_IDS, 0);
 #ifdef PCI_USE_DNS
   pci_define_param(a, "net.domain", PCI_ID_DOMAIN, "DNS domain used for resolving of ID's");
-  pci_define_param(a, "net.cache_path", "~/.pciids-cache", "Name of the ID cache file");
+  pci_define_param(a, "net.cache_name", "~/.pciids-cache", "Name of the ID cache file");
   a->id_lookup_mode = PCI_LOOKUP_CACHE;
 #endif
   for(i=0; i<PCI_ACCESS_MAX; i++)
index dc75835a671fed72d92b4ea4172aa0935d97b0c2..059311ac20ae6e3cfc8f7b60253409c6b7348516 100644 (file)
@@ -24,9 +24,9 @@ static const char cache_version[] = "#PCI-CACHE-1.0";
 static char *get_cache_name(struct pci_access *a)
 {
   char *name, *buf;
-  
-  name = pci_get_param(a, "net.cache_path");
-  if (!name || name[0])
+
+  name = pci_get_param(a, "net.cache_name");
+  if (!name || !name[0])
     return NULL;
   if (strncmp(name, "~/", 2))
     return name;
@@ -38,7 +38,7 @@ static char *get_cache_name(struct pci_access *a)
 
   buf = pci_malloc(a, strlen(pw->pw_dir) + strlen(name+1) + 1);
   sprintf(buf, "%s%s", pw->pw_dir, name+1);
-  pci_set_param_internal(a, "net.cache_path", buf, 0);
+  pci_set_param_internal(a, "net.cache_name", buf, 0);
   return buf;
 }