Re: [PATCH 0/5] lscpu: improve hypervisor detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ruediger Meierwrote:

> I've splitted the original patch into smaller pieces, removed some
> incompatible output format changes and added some test data.

There was a controversial part of this patch, that causes test failure.

There should be a way how to output result of the virtual machine
detection without breaking test cases (and possibly existing scripts).

Index: util-linux-2.24.1/sys-utils/lscpu.c
===================================================================
--- util-linux-2.24.1.orig/sys-utils/lscpu.c
+++ util-linux-2.24.1/sys-utils/lscpu.c
@@ -1181,6 +1322,7 @@ print_parsable(struct lscpu_desc *desc,
 		}
 		fputs(data && *data ? data : "", stdout);
 	}
+	printf(",HvVendor,VirtType");
 	putchar('\n');
 
 	/*
@@ -1210,7 +1352,9 @@ print_parsable(struct lscpu_desc *desc,
 					     buf, sizeof(buf));
 			fputs(data && *data ? data : "", stdout);
 		}
-		putchar('\n');
+		printf(",%s,%s\n",
+		       hv_vendors[desc->hyper] ? hv_vendors[desc->hyper] : "none",
+		       virt_types[desc->virtype]);
 	}
 }
 

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec@xxxxxxx
Lihovarská 1060/12                            tel: +49 911 7405384547
190 00 Praha 9                                 fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux