projects
/
platform
/
core
/
system
/
initrd-flash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3018b9a
)
Check whether creating temporary directory is success or not
97/190797/1
author
Seung-Woo Kim
<sw0312.kim@samsung.com>
Fri, 5 Oct 2018 09:16:29 +0000
(18:16 +0900)
committer
Seung-Woo Kim
<sw0312.kim@samsung.com>
Fri, 5 Oct 2018 09:16:31 +0000
(18:16 +0900)
There is no checking created temporary directory. Check whether
creating is success of not.
Change-Id: I499d34487659f8d3b83b706c98d8fa8d8e5f3251
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/dfu.c
patch
|
blob
|
history
diff --git
a/src/dfu.c
b/src/dfu.c
index f174a7e9b05d7d71460dee1e3002dc3ff59e1ec1..a0a3bedd1cf8c2d9e9e2273b46620a8486dc7162 100644
(file)
--- a/
src/dfu.c
+++ b/
src/dfu.c
@@
-101,7
+101,11
@@
static void mount_dev(const char *dev, const char *fstype)
{
int ret;
- mkdir(DFU_MOUNT_PATH, 0600);
+ ret = mkdir(DFU_MOUNT_PATH, 0600);
+ if (ret < 0) {
+ fprintf(stderr, "Failed to create target directory\n");
+ exit(-1);
+ }
ret = mount(dev, DFU_MOUNT_PATH, fstype, 0, NULL);
if (ret < 0) {