util-linux/sys-utils
Stanislav Brabec 7572fb2b8c lscpu: Detect Windows Subsystem for Linux
Windows 10 implements Windows Subsystem for Linux (WSL).

WSL does not implement support for SIGSEGV handler, which is used inside
is_vmware_platform(). As a result, lscpu crashes there.

Implement WSL detection, and as a side effect, work around the crash.
Note that none of existing virtualization types exactly matches.
But the the closest would be "container".

References:

Provide a way to positively detect WSL from an app compiled on Linux.
https://github.com/Microsoft/BashOnWindows/issues/423

missing support for SIGSEGV handler
https://github.com/Microsoft/BashOnWindows/issues/1637

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2017-01-31 12:28:32 +01:00
..
.gitignore build-sys: support ./configure ADJTIME_PATH= 2014-06-19 10:30:56 +02:00
Makemodule.am build-sys: use MATH_LIBS for hwclock 2017-01-19 11:23:19 +01:00
blkdiscard.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
blkdiscard.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
chcpu.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
chcpu.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
chmem.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
chmem.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
ctrlaltdel.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
ctrlaltdel.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
dmesg.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
dmesg.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
eject.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
eject.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
fallocate.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fallocate.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
flock.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
flock.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
fsfreeze.8 fsfreeze: move filesystem support info to manual page 2016-12-22 12:18:45 +01:00
fsfreeze.c fsfreeze: move filesystem support info to manual page 2016-12-22 12:18:45 +01:00
fstab.5 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fstrim.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fstrim.c fstrim: de-duplicate btrfs sub-volumes 2017-01-31 12:26:01 +01:00
fstrim.service.in fstrim: add -v to the systemd service 2016-10-18 12:09:53 +02:00
fstrim.timer fstrim: systemd timer units should be WantedBy=timers.target 2016-01-12 10:30:36 +01:00
hwclock-cmos.c misc: Fix various typos 2016-05-31 23:40:21 +02:00
hwclock-rtc.c hwclock: fix format specifier [cppcheck] 2016-01-19 12:59:12 +06:00
hwclock.8.in docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
hwclock.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
hwclock.h hwclock: remove referal to deprecated keyboard interface 2014-09-19 19:31:02 +01:00
ipcmk.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
ipcmk.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
ipcrm.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
ipcrm.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
ipcs.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
ipcs.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
ipcutils.c misc: Fix various typos 2016-05-31 23:40:21 +02:00
ipcutils.h ipcs: ulong -> unsigned long 2016-02-11 12:31:03 +01:00
ldattach.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
ldattach.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
losetup.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
losetup.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
lp.h Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
lscpu-dmi.c lscpu: fix cppcheck warnings 2014-09-16 11:16:09 +02:00
lscpu.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
lscpu.c lscpu: Detect Windows Subsystem for Linux 2017-01-31 12:28:32 +01:00
lscpu.h lscpu: Detect Windows Subsystem for Linux 2017-01-31 12:28:32 +01:00
lsipc.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
lsipc.c misc: fix declarations shadowing variables in the global scope [oclint] 2016-07-21 21:14:33 +01:00
lsmem.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
lsmem.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
lsns.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
lsns.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
mount.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mount.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
mountpoint.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mountpoint.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
nsenter.1 nsenter: fix usage() and improve man page 2017-01-09 12:50:09 +01:00
nsenter.c nsenter: fix usage() and improve man page 2017-01-09 12:50:09 +01:00
pivot_root.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
pivot_root.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
prlimit.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
prlimit.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
readprofile.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
readprofile.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
renice.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
renice.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
rtcwake.8.in docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
rtcwake.c rtcwake: make sure buffer is zero terminated [coverity scan] 2016-10-05 11:11:45 +02:00
setarch.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
setarch.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
setpriv.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
setpriv.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
setsid.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
setsid.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
swapoff.8 build-sys: move swapon from mount/ to sys-utils/ 2012-01-11 12:14:29 +01:00
swapoff.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
swapon-common.c mount, umount, swapon, fsck, lsblk, findmnt: harmonize six error messages 2016-03-16 10:39:38 +01:00
swapon-common.h swapon: split swapon-common.c 2014-09-22 13:16:25 +02:00
swapon.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
swapon.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
switch_root.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
switch_root.c switch_root: simplify code and reduce indentation [oclint] 2016-07-21 21:14:33 +01:00
tunelp.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
tunelp.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
umount.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
umount.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
unshare.1 unshare: fix SYNOPSIS and usage() 2017-01-09 12:50:47 +01:00
unshare.c unshare: fix SYNOPSIS and usage() 2017-01-09 12:50:47 +01:00
wdctl.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
wdctl.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00
zramctl.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
zramctl.c Use --help suggestion on invalid option 2016-12-19 13:13:34 +01:00