]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/linux_version.c
1 #include "common/linux_version.h"
5 #include <sys/utsname.h>
7 int get_linux_version(void)
13 if (uname(&ubuf
) || strcmp(ubuf
.sysname
, "Linux"))
16 n
= sscanf(ubuf
.release
, "%d.%d.%d", &a
, &b
, &c
);
19 return KERNEL_VERSION(a
, b
, c
);
21 return KERNEL_VERSION(a
, b
, 0);