Skip to content

Commit 89970a8

Browse files
committed
stress-sysfs: rename os_release to linux_release
os_release causes tcc to break with: stress-sysfs.c:718: error: bad terminal (1) error: /usr/bin/x86_64-linux-gnu-pcc-cpp terminated with status 1 Renaming os_release fixes this. Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent 4e0dea6 commit 89970a8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

stress-sysfs.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static shim_pthread_spinlock_t hash_lock;
7272
static volatile bool drain_kmsg = false;
7373
static volatile uint32_t counter = 0;
7474
static const char signum_path[] = "/sys/kernel/notes";
75-
static uint32_t os_release;
75+
static uint32_t linux_release;
7676
static stress_hash_table_t *sysfs_hash_table;
7777
static uint64_t hash_items = 0;
7878

@@ -508,7 +508,7 @@ static bool stress_sys_skip(const char *path)
508508
/*
509509
* The tpm driver for pre Linux 4.10 is racey so skip
510510
*/
511-
if (UNLIKELY((os_release < 410) && (shim_strstr(path, "/sys/kernel/security/tpm0"))))
511+
if (UNLIKELY((linux_release < 410) && (shim_strstr(path, "/sys/kernel/security/tpm0"))))
512512
return true;
513513

514514
return false;
@@ -714,18 +714,19 @@ static int stress_sysfs(stress_args_t *args)
714714
if (n <= 0)
715715
goto exit_no_sysfs_entries;
716716

717-
os_release = 0;
717+
linux_release = 0;
718718
#if defined(HAVE_UNAME) && \
719719
defined(HAVE_SYS_UTSNAME_H)
720720
{
721721
static struct utsname utsbuf;
722722

723723
ret = uname(&utsbuf);
724724
if (ret == 0) {
725-
uint16_t major, minor;
725+
uint16_t major;
726+
uint16_t minor;
726727

727728
if (sscanf(utsbuf.release, "%5" SCNu16 ".%5" SCNu16, &major, &minor) == 2)
728-
os_release = (major * 100) + minor;
729+
linux_release = (major * 100) + minor;
729730
}
730731
}
731732
#else

0 commit comments

Comments
 (0)