From: Kitae Kim Date: Mon, 10 Feb 2014 02:29:21 +0000 (+0900) Subject: emulator: improve error handling X-Git-Tag: TizenStudio_2.0_p2.3~321 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca853b3ffaae06b21987528a9d6d692e2e7046fe;p=sdk%2Femulator%2Fqemu.git emulator: improve error handling - check return value and write an error message. Change-Id: Ic92635ac19825dd2eb3899f15cf3f3da5a923f13 Signed-off-by: Kitae Kim --- diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index c909418..af0f097 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);