From ca853b3ffaae06b21987528a9d6d692e2e7046fe Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Mon, 10 Feb 2014 11:29:21 +0900 Subject: [PATCH] emulator: improve error handling - check return value and write an error message. Change-Id: Ic92635ac19825dd2eb3899f15cf3f3da5a923f13 Signed-off-by: Kitae Kim --- tizen/src/emulator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index c909418a76..af0f097764 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -1,7 +1,7 @@ /* * Emulator * - * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. + * Copyright (C) 2011 - 2014 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * SeokYeon Hwang @@ -238,7 +238,9 @@ static void set_image_and_log_path(char *qemu_argv) } #else if (access(log_path, R_OK) != 0) { - g_mkdir(log_path, 0755); + if (g_mkdir(log_path, 0755) < 0) { + fprintf(stderr, "failed to create log directory %s\n", log_path); + } } #endif strcat(log_path, LOGFILE); -- 2.34.1