diff options
author | Dimitar Borisov <x0152684@ti.com> | 2012-09-20 13:59:41 +0300 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 18:51:32 +0200 |
commit | 2d0df2e4e2334ba80a026a6fed3d26d0e4b720e1 (patch) | |
tree | c6a4151c90f368dc14838f0eef8223642233c934 | |
parent | c986059849fffaf93121b775d0bd7d65bae60b66 (diff) | |
download | hardware_ti_omap4-2d0df2e4e2334ba80a026a6fed3d26d0e4b720e1.zip hardware_ti_omap4-2d0df2e4e2334ba80a026a6fed3d26d0e4b720e1.tar.gz hardware_ti_omap4-2d0df2e4e2334ba80a026a6fed3d26d0e4b720e1.tar.bz2 |
camera_test: SDCARD_PATH is not added when OTC is used
- When camera_test script is executed using the OTC
SDCARD_PATH should not be added to the output directory.
- The command that is send to the OTC for the first script with primary sensor is
camera_test -s /mnt/sdcard/L_CAMERAHAL_0001 -c 0.
- If SDCARD_PATH in this case is not removed the output directory will be:
/sdcard//mnt/sdcard/L_CAMERAHAL_0001 and the script will not start.
Change-Id: I10cf9ee9972b6bb619460afc4a80ff4f4d96ddb5
Signed-off-by: Dimitar Borisov <x0152684@ti.com>
-rw-r--r-- | test/CameraHal/camera_test_menu.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CameraHal/camera_test_menu.cpp b/test/CameraHal/camera_test_menu.cpp index a1f5ed2..03affe8 100644 --- a/test/CameraHal/camera_test_menu.cpp +++ b/test/CameraHal/camera_test_menu.cpp @@ -4011,6 +4011,7 @@ int setOutputDirPath(cmd_args_t *cmd_args, int restart_count) { const char *config = cmd_args->script_file_name; char dir_name[40]; size_t count = 0; + char *p; // remove just the '.txt' part of the config while ((config[count] != '.') && ((count + 1) < sizeof(dir_name))) { @@ -4020,6 +4021,15 @@ int setOutputDirPath(cmd_args_t *cmd_args, int restart_count) { strncpy(dir_name, config, count); dir_name[count] = NULL; + p = dir_name; + while (*p != '\0') { + if (*p == '/') { + printf("SDCARD_PATH is not added to the output directory.\n"); + // Needed when camera_test script is executed using the OTC + strcpy(output_dir_path, ""); + break; + } + } strcat(output_dir_path, dir_name); if (camera_index == 1) { |