Displaying 1 result from an estimated 1 matches for "add_to_device_list".
2009 Aug 03
1
[PATCH] Recognise cd-rom devices in devsparts.c
...r)) != NULL) {
- if (strncmp (d->d_name, "sd", 2) == 0 ||
- strncmp (d->d_name, "hd", 2) == 0 ||
- strncmp (d->d_name, "vd", 2) == 0) {
- snprintf (buf, sizeof buf, "/dev/%s", d->d_name);
+ /* Add a device to the list of devices */
+ int add_to_device_list(const char *device) {
+ char dev_path[256];
+ snprintf (dev_path, sizeof dev_path, "/dev/%s", device);
- /* RHBZ#514505: Some versions of qemu <= 0.10 add a
- * CD-ROM device even though we didn't request it. Try to
- * detect this by seeing if the dev...