Check return value of uname()
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 8 Apr 2013 06:25:19 +0000 (15:25 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 8 Apr 2013 06:25:19 +0000 (15:25 +0900)
Fix prevent bug.

packaging/net-config.spec
src/utils/emulator.c

index 99819e937921dd31300469dd9dcc7f12d6757d7a..116d0d17a112f894239fa70e404009b7ab7c13c0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       net-config
 Summary:    TIZEN Network Configuration Module
-Version:    0.1.90_17
+Version:    0.1.90_18
 Release:    1
 Group:      System/Network
 License:    Apache License Version 2.0
index f0b07da15fb222005ec328dc0657016761c78ea9..5a04d7cfab42dcb024e018ac481a4793ef3555a8 100644 (file)
@@ -38,7 +38,8 @@ static gboolean __netconfig_emulator_test_emulation_env(void)
 
        DBG("Test emulation environment");
 
-       uname(&buf);
+       if (uname(&buf) != 0)
+               return FALSE;
 
        if (g_str_has_suffix(buf.machine, EMUL_UTSNAME_MACHINE_SUFFIX) == TRUE)
                return TRUE;