111
This commit is contained in:
parent
3cc9b87866
commit
9cd11e7e22
|
@ -167,7 +167,7 @@ static int get_disk_identifier(int fd, kdk_diskinfo *di)
|
||||||
}
|
}
|
||||||
|
|
||||||
char *model = strndup((char*)&hd[27], 40);
|
char *model = strndup((char*)&hd[27], 40);
|
||||||
char *fwrev = strndup(&hd[23], 8); // 固件版本
|
char *fwrev = strndup((char*)&hd[23], 8); // 固件版本
|
||||||
char *serno = strndup((char*)&hd[10], 20);
|
char *serno = strndup((char*)&hd[10], 20);
|
||||||
|
|
||||||
di->serial = malloc(strlen(serno) + 1);
|
di->serial = malloc(strlen(serno) + 1);
|
||||||
|
@ -440,9 +440,9 @@ kdk_diskinfo *_kdk_get_diskinfo(const char *diskname)
|
||||||
char *dn = diskname + pos;
|
char *dn = diskname + pos;
|
||||||
// klog_debug("%s\n", dn);
|
// klog_debug("%s\n", dn);
|
||||||
|
|
||||||
const char *dev_PP = NULL;
|
struct udev_device *dev_PP = NULL;
|
||||||
const char *serial = NULL;
|
struct udev_device *serial = NULL;
|
||||||
const char *dev_P = NULL;
|
struct udev_device *dev_P = NULL;
|
||||||
const char *serial_val = NULL;
|
const char *serial_val = NULL;
|
||||||
|
|
||||||
dev_block = udev_device_new_from_subsystem_sysname(udev,"block",dn);
|
dev_block = udev_device_new_from_subsystem_sysname(udev,"block",dn);
|
||||||
|
|
Loading…
Reference in New Issue