diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index a31281699d..4b5da50832 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -551,9 +551,9 @@ AddDirectoryToHaikuImage home Desktop ; AddDirectoryToHaikuImage home config bin ; AddDirectoryToHaikuImage home config lib ; AddDirectoryToHaikuImage home mail ; -AddDirectoryToHaikuImage var empty ; -AddDirectoryToHaikuImage var log ; -AddDirectoryToHaikuImage var tmp ; +AddDirectoryToHaikuImage common var empty ; +AddDirectoryToHaikuImage common var log ; +AddDirectoryToHaikuImage common cache tmp ; AddDirectoryToHaikuImage home config add-ons kernel drivers bin ; AddDirectoryToHaikuImage home config add-ons kernel drivers dev ; diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 0f6d7ebd24..53552fe002 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -58,7 +58,7 @@ SCRIPTS=system/boot SERVERS=system/servers # clean the shared memory dir -shmDir=/boot/var/shared_memory +shmDir=/var/shared_memory rm -rf $shmDir mkdir -p $shmDir chmod 777 $shmDir diff --git a/src/apps/text_search/Grepper.cpp b/src/apps/text_search/Grepper.cpp index 66c032d372..c09a3126cb 100644 --- a/src/apps/text_search/Grepper.cpp +++ b/src/apps/text_search/Grepper.cpp @@ -20,6 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ + #include "Grepper.h" #include @@ -176,7 +177,7 @@ Grepper::_GrepperThread() char command[B_PATH_NAME_LENGTH + 32]; BPath tempFile; - sprintf(fileName, "/boot/var/tmp/SearchText%ld", fThreadId); + sprintf(fileName, "/tmp/SearchText%ld", fThreadId); tempFile.SetTo(fileName); while (!fMustQuit && fIterator->GetNextName(fileName)) { @@ -249,7 +250,7 @@ Grepper::_GrepperThread() // We wait with removing the temporary file until after the // entire search has finished, to prevent a lot of flickering - // if the Tracker window for /boot/var/tmp/ might be open. + // if the Tracker window for /tmp/ might be open. remove(tempFile.Path()); diff --git a/src/system/kernel/fs/vfs_boot.cpp b/src/system/kernel/fs/vfs_boot.cpp index 02ea5a1d1b..a2dee6a179 100644 --- a/src/system/kernel/fs/vfs_boot.cpp +++ b/src/system/kernel/fs/vfs_boot.cpp @@ -1,6 +1,6 @@ /* * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. - * Copyright 2002-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2002-2010, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. * * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. @@ -48,8 +48,8 @@ static struct { {"/system", "/boot/system"}, {"/bin", "/boot/system/bin"}, {"/etc", "/boot/common/etc"}, - {"/var", "/boot/var"}, - {"/tmp", "/boot/var/tmp"}, + {"/var", "/boot/common/var"}, + {"/tmp", "/boot/common/cache/tmp"}, {NULL} }; diff --git a/src/system/libroot/os/find_directory.c b/src/system/libroot/os/find_directory.c index cb79bc83a3..c737e0964e 100644 --- a/src/system/libroot/os/find_directory.c +++ b/src/system/libroot/os/find_directory.c @@ -1,6 +1,6 @@ /* * Copyright 2004, François Revol. - * Copyright 2007-2009, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2007-2010, Axel Dörfler, axeld@pinc-software.de. * * Distributed under the terms of the MIT license. */ @@ -72,10 +72,10 @@ static const char *kCommonDirectories[] = { COMMON "/documentation", COMMON "/settings", "develop", // B_COMMON_DEVELOP_DIRECTORY - "var/log", // B_COMMON_LOG_DIRECTORY - "var/spool", // B_COMMON_SPOOL_DIRECTORY - "var/tmp", // B_COMMON_TEMP_DIRECTORY - "var", // B_COMMON_VAR_DIRECTORY + COMMON "/var/log", // B_COMMON_LOG_DIRECTORY + COMMON "/var/spool", // B_COMMON_SPOOL_DIRECTORY + COMMON "/cache/tmp", // B_COMMON_TEMP_DIRECTORY + COMMON "/var", // B_COMMON_VAR_DIRECTORY COMMON "/add-ons/Translators", COMMON "/add-ons/media", COMMON "/data/sounds", diff --git a/src/system/libroot/posix/sys/mman.cpp b/src/system/libroot/posix/sys/mman.cpp index 82480a0b1c..e0551bbf8d 100644 --- a/src/system/libroot/posix/sys/mman.cpp +++ b/src/system/libroot/posix/sys/mman.cpp @@ -3,6 +3,7 @@ * Distributed under the terms of the MIT License. */ + #include #include @@ -16,7 +17,7 @@ #include -static const char* kSharedMemoryDir = "/boot/var/shared_memory/"; +static const char* kSharedMemoryDir = "/var/shared_memory/"; static bool diff --git a/src/tests/kits/storage/EntryTest.cpp b/src/tests/kits/storage/EntryTest.cpp index e35b2e0708..d4f2e53f17 100644 --- a/src/tests/kits/storage/EntryTest.cpp +++ b/src/tests/kits/storage/EntryTest.cpp @@ -2243,7 +2243,7 @@ isHarmlessPathname(const char *path) { bool result = false; if (path) { - const char *harmlessDir = "/boot/var/tmp/"; + const char *harmlessDir = "/tmp/"; result = (string(path).find(harmlessDir) == 0); } if (!result) @@ -2370,14 +2370,13 @@ static const char *tooLongEntryname = "1234567890123456789012345678901234567890123456789012345678901234567890" "12345678901234567890123456789012345678901234567"; -// init_entry_test -static -void + +static void init_entry_test() { // root dir for testing testDir.initDir(badTestEntry, "testDir"); - testDir.initPath((string("/boot/var/tmp/") + testDir.name).c_str()); + testDir.initPath((string("/tmp/") + testDir.name).c_str()); allTestEntries.pop_back(); // other entries dir1.initDir(testDir, "dir1");