diff options
author | Mike Playle <mike.playle@realvnc.com> | 2010-07-09 17:02:22 +0100 |
---|---|---|
committer | Mike Playle <mike.playle@realvnc.com> | 2010-07-09 17:02:22 +0100 |
commit | d095010b52282f41a483c7780815e0242f1e1629 (patch) | |
tree | 5010524d08e16a0f1a9990c85ffdcf9c53a0b421 | |
parent | 802e057e6e55fc120cb6d344ca5e6a2690cff3f0 (diff) | |
download | oprofile-d095010b52282f41a483c7780815e0242f1e1629.tar.gz |
Correct permissions in mkdir callsandroid-sdk-tools_r7android-adt-0.9.9android-adt-0.9.8tools_r9tools_r8tools_r7froyo-plus-aosp
The 'mode' parameter to mkdir() is in octal, so it should have a
leading 0. Also, directories need their 'x' bits set.
Change-Id: I95bdae777ed31a8f99d1eeb4974a9ceb8d85633d
-rw-r--r-- | opcontrol/opcontrol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opcontrol/opcontrol.cpp b/opcontrol/opcontrol.cpp index 0552c8c..ecf4f10 100644 --- a/opcontrol/opcontrol.cpp +++ b/opcontrol/opcontrol.cpp @@ -323,11 +323,11 @@ void setup_session_dir() close(fd); } - if (mkdir(OP_DATA_DIR, 755)) { + if (mkdir(OP_DATA_DIR, 0755)) { fprintf(stderr, "Cannot create directory \"%s\": %s\n", OP_DATA_DIR, strerror(errno)); } - if (mkdir(OP_DATA_DIR"/samples", 644)) { + if (mkdir(OP_DATA_DIR"/samples", 0755)) { fprintf(stderr, "Cannot create directory \"%s\": %s\n", OP_DATA_DIR"/samples", strerror(errno)); } @@ -339,7 +339,7 @@ int do_setup() setup_session_dir(); - if (mkdir(OP_DRIVER_BASE, 644)) { + if (mkdir(OP_DRIVER_BASE, 0755)) { fprintf(stderr, "Cannot create directory "OP_DRIVER_BASE": %s\n", strerror(errno)); return -1; |