Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
  package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
  directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
  I'm sure some occurrence still remain. They can be adjusted when the
  remaining B_COMMON_*_DIRECTORY constants are removed.
This commit is contained in:
Ingo Weinhold 2013-10-03 21:44:44 +02:00
parent ded25be197
commit 4b7e219688
80 changed files with 165 additions and 279 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2011, Haiku, Inc.
* Copyright 2011-2013, Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PACKAGE_DEFS_H_
@ -11,7 +11,6 @@ namespace BPackageKit {
enum BPackageInstallationLocation {
B_PACKAGE_INSTALLATION_LOCATION_SYSTEM,
B_PACKAGE_INSTALLATION_LOCATION_COMMON,
B_PACKAGE_INSTALLATION_LOCATION_HOME,
B_PACKAGE_INSTALLATION_LOCATION_ENUM_COUNT

View File

@ -42,33 +42,34 @@ typedef enum {
B_COMMON_LIB_DIRECTORY,
B_COMMON_SERVERS_DIRECTORY,
B_COMMON_BIN_DIRECTORY,
B_COMMON_ETC_DIRECTORY,
B_SYSTEM_ETC_DIRECTORY,
B_COMMON_DOCUMENTATION_DIRECTORY,
B_COMMON_SETTINGS_DIRECTORY,
B_SYSTEM_SETTINGS_DIRECTORY,
B_COMMON_DEVELOP_DIRECTORY,
B_COMMON_LOG_DIRECTORY,
B_COMMON_SPOOL_DIRECTORY,
B_COMMON_TEMP_DIRECTORY,
B_COMMON_VAR_DIRECTORY,
B_SYSTEM_LOG_DIRECTORY,
B_SYSTEM_SPOOL_DIRECTORY,
B_SYSTEM_TEMP_DIRECTORY,
B_SYSTEM_VAR_DIRECTORY,
B_COMMON_TRANSLATORS_DIRECTORY,
B_COMMON_MEDIA_NODES_DIRECTORY,
B_COMMON_SOUNDS_DIRECTORY,
B_COMMON_DATA_DIRECTORY,
B_COMMON_CACHE_DIRECTORY,
B_SYSTEM_CACHE_DIRECTORY,
B_COMMON_PACKAGES_DIRECTORY,
B_COMMON_HEADERS_DIRECTORY,
B_COMMON_NONPACKAGED_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY,
B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY,
B_COMMON_NONPACKAGED_BIN_DIRECTORY,
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
B_COMMON_NONPACKAGED_FONTS_DIRECTORY,
B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY,
B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY,
B_COMMON_NONPACKAGED_LIB_DIRECTORY,
B_COMMON_NONPACKAGED_HEADERS_DIRECTORY,
B_COMMON_NONPACKAGED_DEVELOP_DIRECTORY,
B_SYSTEM_NONPACKAGED_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY,
B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY,
B_SYSTEM_NONPACKAGED_BIN_DIRECTORY,
B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY,
B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY,
B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY,
B_SYSTEM_NONPACKAGED_LIB_DIRECTORY,
B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY,
B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY,
/* User directories. These are interpreted in the context
of the user making the find_directory call. */

View File

@ -67,8 +67,6 @@ public:
const InstalledRepository* SystemRepository() const
{ return fSystemRepository; }
const InstalledRepository* CommonRepository() const
{ return fCommonRepository; }
const InstalledRepository* HomeRepository() const
{ return fHomeRepository; }
const InstalledRepositoryList& InstalledRepositories() const
@ -139,7 +137,6 @@ protected:
BPackageInstallationLocation fLocation;
BSolver* fSolver;
InstalledRepository* fSystemRepository;
InstalledRepository* fCommonRepository;
InstalledRepository* fHomeRepository;
InstalledRepositoryList fInstalledRepositories;
RemoteRepositoryList fOtherRepositories;

View File

@ -14,7 +14,6 @@
enum PackageFSMountType {
PACKAGE_FS_MOUNT_TYPE_SYSTEM,
PACKAGE_FS_MOUNT_TYPE_COMMON,
PACKAGE_FS_MOUNT_TYPE_HOME,
PACKAGE_FS_MOUNT_TYPE_CUSTOM,

View File

@ -218,7 +218,7 @@ status_t
ReadSettings()
{
BPath path;
status_t result = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path);
status_t result = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path);
if (result != B_OK)
return result;
result = path.Append("nfs4_idmapper.conf");

View File

@ -21,12 +21,10 @@ static const char* const kLinkPaths[PackageLinkSymlink::TYPE_ENUM_COUNT]
[PACKAGE_FS_MOUNT_TYPE_ENUM_COUNT] = {
{
"../..",
"../../../common",
"../../../home/config"
},
{
"../../../system/settings",
"../../../common/settings",
"../../../home/config/settings/global"
}
};

View File

@ -95,7 +95,6 @@ PackageFSRoot::RegisterVolume(Volume* volume)
switch (volume->MountType()) {
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
case PACKAGE_FS_MOUNT_TYPE_COMMON:
relativeRootPath = "..";
break;
case PACKAGE_FS_MOUNT_TYPE_HOME:

View File

@ -467,9 +467,6 @@ Volume::Mount(const char* parameterString)
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
volumeName = "system";
break;
case PACKAGE_FS_MOUNT_TYPE_COMMON:
volumeName = "common";
break;
case PACKAGE_FS_MOUNT_TYPE_HOME:
volumeName = "config";
break;
@ -1611,8 +1608,6 @@ Volume::_InitMountType(const char* mountType)
fMountType = PACKAGE_FS_MOUNT_TYPE_CUSTOM;
else if (strcmp(mountType, "system") == 0)
fMountType = PACKAGE_FS_MOUNT_TYPE_SYSTEM;
else if (strcmp(mountType, "common") == 0)
fMountType = PACKAGE_FS_MOUNT_TYPE_COMMON;
else if (strcmp(mountType, "home") == 0)
fMountType = PACKAGE_FS_MOUNT_TYPE_HOME;
else if (strcmp(mountType, "custom") == 0)
@ -1663,7 +1658,6 @@ Volume::_CreateShineThroughDirectories(const char* shineThroughSetting)
// nothing specified -- derive from mount type
switch (fMountType) {
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
case PACKAGE_FS_MOUNT_TYPE_COMMON:
case PACKAGE_FS_MOUNT_TYPE_HOME:
directories = kShineThroughDirectories;
break;
@ -1674,8 +1668,6 @@ Volume::_CreateShineThroughDirectories(const char* shineThroughSetting)
}
} else if (strcmp(shineThroughSetting, "system") == 0)
directories = kShineThroughDirectories;
else if (strcmp(shineThroughSetting, "common") == 0)
directories = kShineThroughDirectories;
else if (strcmp(shineThroughSetting, "home") == 0)
directories = kShineThroughDirectories;
else if (strcmp(shineThroughSetting, "none") == 0)

View File

@ -97,7 +97,7 @@ PlainTextCatalog::PlainTextCatalog(const char *signature, const char *language,
if (status != B_OK) {
// look in common-etc folder (/boot/home/config/etc):
BPath commonEtcPath;
find_directory(B_COMMON_ETC_DIRECTORY, &commonEtcPath);
find_directory(B_SYSTEM_ETC_DIRECTORY, &commonEtcPath);
if (commonEtcPath.InitCheck() == B_OK) {
catalogName = BString(commonEtcPath.Path())
<< "/locale/" << kCatFolder

View File

@ -65,7 +65,7 @@ PrinterPrefs::LoadSettings(BMessage *settings)
status_t status;
BFile file;
status = find_directory(B_COMMON_SETTINGS_DIRECTORY, &fSettingsPath);
status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &fSettingsPath);
if (status != B_OK) {
// Could not find settings folder.
return status;

View File

@ -118,8 +118,7 @@ ExpanderRules::_LoadRulesFiles()
const directory_which kDirectories[] = {
B_USER_NONPACKAGED_DATA_DIRECTORY,
B_USER_DATA_DIRECTORY,
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
B_COMMON_DATA_DIRECTORY,
B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
B_SYSTEM_DATA_DIRECTORY
};

View File

@ -462,9 +462,6 @@ MainWindow::_RefreshPackageList()
if (repository == static_cast<const BSolverRepository*>(
manager.SystemRepository())) {
installationLocation = "system";
} else if (repository == static_cast<const BSolverRepository*>(
manager.CommonRepository())) {
installationLocation = "common";
} else if (repository == static_cast<const BSolverRepository*>(
manager.HomeRepository())) {
installationLocation = "home";

View File

@ -240,10 +240,8 @@ PackageManager::GetPackageActions(PackageInfoRef package, Model* model)
if (repository == static_cast<const BSolverRepository*>(
SystemRepository())) {
installed = true;
systemPackage = true;
} else if (repository == static_cast<const BSolverRepository*>(
CommonRepository())) {
installed = true;
// systemPackage = true;
// TODO: Being installed in system doesn't make it a system package.
} else if (repository == static_cast<const BSolverRepository*>(
HomeRepository())) {
installed = true;

View File

@ -45,7 +45,7 @@ DesktopWindow::DesktopWindow(BRect frame, bool editMode)
BPath path;
status_t err;
entry_ref ref;
err = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path, true);
err = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, true);
if (err >= B_OK) {
BDirectory dir(path.Path());
if (!dir.Contains("x-vnd.Haiku-Login", B_DIRECTORY_NODE))

View File

@ -1909,7 +1909,7 @@ TTextView::Open(hyper_text *enclosure)
case TYPE_BE_ENCLOSURE:
if (!enclosure->have_ref) {
BPath path;
if (find_directory(B_COMMON_TEMP_DIRECTORY, &path) == B_NO_ERROR) {
if (find_directory(B_SYSTEM_TEMP_DIRECTORY, &path) == B_NO_ERROR) {
BDirectory dir(path.Path());
if (dir.InitCheck() == B_NO_ERROR) {
char name[B_FILE_NAME_LENGTH];

View File

@ -214,7 +214,7 @@ RecorderWindow::InitWindow()
try {
// Find temp directory for recorded sounds.
BPath path;
if (!(error = find_directory(B_COMMON_TEMP_DIRECTORY, &path)))
if (!(error = find_directory(B_SYSTEM_TEMP_DIRECTORY, &path)))
error = fTempDir.SetTo(path.Path());
if (error < 0)
goto bad_mojo;

View File

@ -2364,7 +2364,7 @@ BrowserWindow::_HandlePageSourceResult(const BMessage* message)
ret = message->FindString("source", &source);
if (ret == B_OK)
ret = find_directory(B_COMMON_TEMP_DIRECTORY, &pathToPageSource);
ret = find_directory(B_SYSTEM_TEMP_DIRECTORY, &pathToPageSource);
BString tmpFileName("PageSource_");
tmpFileName << system_time() << ".html";

View File

@ -277,7 +277,7 @@ WorkspacesSettings::_Open(BFile& file, int mode)
BPath path;
status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path);
if (status != B_OK)
status = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path);
status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path);
if (status != B_OK)
return status;
@ -285,7 +285,7 @@ WorkspacesSettings::_Open(BFile& file, int mode)
status = file.SetTo(path.Path(), mode);
if (mode == B_READ_ONLY && status == B_ENTRY_NOT_FOUND) {
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) == B_OK) {
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) == B_OK) {
path.Append(kSettingsFile);
status = file.SetTo(path.Path(), mode);
}

View File

@ -643,7 +643,7 @@ initialize_hostname_list ()
temp = get_string_value ("HOSTFILE");
if (temp == 0)
temp = get_string_value ("hostname_completion_file");
if (temp == 0 && find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
if (temp == 0 && find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
sizeof(path)) == B_OK) {
strlcat(path, "/network/hosts", sizeof(path));
temp = path;

View File

@ -60,33 +60,33 @@ directoryType directoryTypes[] = {
KEYVALUE_PAIR(B_COMMON_LIB_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_SERVERS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_BIN_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_ETC_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_ETC_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_DOCUMENTATION_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_SETTINGS_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_SETTINGS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_DEVELOP_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_LOG_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_SPOOL_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_TEMP_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_VAR_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_LOG_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_SPOOL_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_TEMP_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_VAR_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_TRANSLATORS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_MEDIA_NODES_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_SOUNDS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_DATA_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_CACHE_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_CACHE_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_PACKAGES_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_HEADERS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_BIN_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DATA_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_FONTS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_LIB_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_HEADERS_DIRECTORY),
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DEVELOP_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_BIN_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DATA_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_LIB_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY),
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY),
// User directories
KEYVALUE_PAIR(B_USER_DIRECTORY),

View File

@ -34,10 +34,7 @@ static const char* const kLongUsage =
"Options:\n"
" -H, --home\n"
" Install the packages in the user's home directory. Default is to\n"
" install in the common directory.\n"
" -S, --system\n"
" Install the packages in the system directory. Default is to\n"
" install in the common directory.\n"
" install in the system directory.\n"
"\n";
@ -49,18 +46,17 @@ int
InstallCommand::Execute(int argc, const char* const* argv)
{
BPackageInstallationLocation location
= B_PACKAGE_INSTALLATION_LOCATION_COMMON;
= B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
while (true) {
static struct option sLongOptions[] = {
{ "help", no_argument, 0, 'h' },
{ "home", no_argument, 0, 'H' },
{ "system", no_argument, 0, 'S' },
{ 0, 0, 0, 0 }
};
opterr = 0; // don't print errors
int c = getopt_long(argc, (char**)argv, "hHS", sLongOptions, NULL);
int c = getopt_long(argc, (char**)argv, "hH", sLongOptions, NULL);
if (c == -1)
break;
@ -73,10 +69,6 @@ InstallCommand::Execute(int argc, const char* const* argv)
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
break;
case 'S':
location = B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
break;
default:
PrintUsageAndExit(true);
break;

View File

@ -189,9 +189,6 @@ SearchCommand::Execute(int argc, const char* const* argv)
if (package->Repository() == static_cast<const BSolverRepository*>(
packageManager.SystemRepository()))
installed = "system";
else if (package->Repository() == static_cast<const BSolverRepository*>(
packageManager.CommonRepository()))
installed = "common";
else if (package->Repository() == static_cast<const BSolverRepository*>(
packageManager.HomeRepository()))
installed = "home";

View File

@ -34,10 +34,7 @@ static const char* const kLongUsage =
"Options:\n"
" -H, --home\n"
" Uninstall the packages from the user's home directory. Default is to\n"
" uninstall from the common directory.\n"
" -S, --system\n"
" Uninstall the packages from the system directory. Default is to\n"
" uninstall from the common directory.\n"
" uninstall from the system directory.\n"
"\n";
@ -49,18 +46,17 @@ int
UninstallCommand::Execute(int argc, const char* const* argv)
{
BPackageInstallationLocation location
= B_PACKAGE_INSTALLATION_LOCATION_COMMON;
= B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
while (true) {
static struct option sLongOptions[] = {
{ "help", no_argument, 0, 'h' },
{ "home", no_argument, 0, 'H' },
{ "system", no_argument, 0, 'S' },
{ 0, 0, 0, 0 }
};
opterr = 0; // don't print errors
int c = getopt_long(argc, (char**)argv, "hHS", sLongOptions, NULL);
int c = getopt_long(argc, (char**)argv, "hH", sLongOptions, NULL);
if (c == -1)
break;
@ -73,10 +69,6 @@ UninstallCommand::Execute(int argc, const char* const* argv)
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
break;
case 'S':
location = B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
break;
default:
PrintUsageAndExit(true);
break;

View File

@ -35,10 +35,7 @@ static const char* const kLongUsage =
"Options:\n"
" -H, --home\n"
" Update the packages in the user's home directory. Default is to\n"
" update in the common directory.\n"
" -S, --system\n"
" Update the packages in the system directory. Default is to\n"
" update in the common directory.\n"
" update in the system directory.\n"
"\n";
@ -50,18 +47,17 @@ int
UpdateCommand::Execute(int argc, const char* const* argv)
{
BPackageInstallationLocation location
= B_PACKAGE_INSTALLATION_LOCATION_COMMON;
= B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
while (true) {
static struct option sLongOptions[] = {
{ "help", no_argument, 0, 'h' },
{ "home", no_argument, 0, 'H' },
{ "system", no_argument, 0, 'S' },
{ 0, 0, 0, 0 }
};
opterr = 0; // don't print errors
int c = getopt_long(argc, (char**)argv, "hHS", sLongOptions, NULL);
int c = getopt_long(argc, (char**)argv, "hH", sLongOptions, NULL);
if (c == -1)
break;
@ -74,10 +70,6 @@ UpdateCommand::Execute(int argc, const char* const* argv)
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
break;
case 'S':
location = B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
break;
default:
PrintUsageAndExit(true);
break;

View File

@ -64,13 +64,13 @@ find_directory(directory_which which, dev_t device, bool createIt,
// we support only the handful of paths we need
const char* path;
switch (which) {
case B_COMMON_TEMP_DIRECTORY:
case B_SYSTEM_TEMP_DIRECTORY:
path = HAIKU_BUILD_GENERATED_DIRECTORY "/tmp";
break;
case B_COMMON_SETTINGS_DIRECTORY:
case B_SYSTEM_SETTINGS_DIRECTORY:
path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/settings";
break;
case B_COMMON_CACHE_DIRECTORY:
case B_SYSTEM_CACHE_DIRECTORY:
path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/cache";
break;
case B_USER_SETTINGS_DIRECTORY:

View File

@ -388,7 +388,7 @@ init_map_rules(struct gen_p *irs, const char *conf_file) {
FILE *conf;
if (conf_file == NULL) {
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
sizeof(path)) == B_OK) {
strlcat(path, "/network/irs.conf", sizeof(path));
conf_file = path;

View File

@ -449,7 +449,7 @@ ho_rewind(struct irs_ho *this) {
(void)fclose(pvt->fp);
}
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
sizeof(path)) == B_OK) {
strlcat(path, "/network/hosts", sizeof(path));

View File

@ -311,7 +311,7 @@ __res_vinit(res_state statp, int preinit) {
(line[sizeof(name) - 1] == ' ' || \
line[sizeof(name) - 1] == '\t'))
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
sizeof(path)) == B_OK)
strlcat(path, "/network/resolv.conf", sizeof(path));

View File

@ -99,8 +99,7 @@ GLRendererRoster::AddDefaultPaths()
const directory_which paths[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};

View File

@ -96,7 +96,7 @@ BContext::_Initialize()
return B_NO_MEMORY;
BPath tempPath;
status_t result = find_directory(B_COMMON_TEMP_DIRECTORY, &tempPath, true);
status_t result = find_directory(B_SYSTEM_TEMP_DIRECTORY, &tempPath, true);
if (result != B_OK)
return result;
BDirectory tempDirectory(tempPath.Path());

View File

@ -53,7 +53,7 @@ BPackageRoster::~BPackageRoster()
status_t
BPackageRoster::GetCommonRepositoryConfigPath(BPath* path, bool create) const
{
return _GetRepositoryPath(path, create, B_COMMON_SETTINGS_DIRECTORY);
return _GetRepositoryPath(path, create, B_SYSTEM_SETTINGS_DIRECTORY);
}
@ -67,7 +67,7 @@ BPackageRoster::GetUserRepositoryConfigPath(BPath* path, bool create) const
status_t
BPackageRoster::GetCommonRepositoryCachePath(BPath* path, bool create) const
{
return _GetRepositoryPath(path, create, B_COMMON_CACHE_DIRECTORY);
return _GetRepositoryPath(path, create, B_SYSTEM_CACHE_DIRECTORY);
}

View File

@ -52,8 +52,6 @@ BPackageManager::BPackageManager(BPackageInstallationLocation location)
fSolver(NULL),
fSystemRepository(new (std::nothrow) InstalledRepository("system",
B_PACKAGE_INSTALLATION_LOCATION_SYSTEM, -1)),
fCommonRepository(new (std::nothrow) InstalledRepository("common",
B_PACKAGE_INSTALLATION_LOCATION_COMMON, -2)),
fHomeRepository(new (std::nothrow) InstalledRepository("home",
B_PACKAGE_INSTALLATION_LOCATION_HOME, -3)),
fInstalledRepositories(10),
@ -69,7 +67,6 @@ BPackageManager::~BPackageManager()
{
delete fSolver;
delete fSystemRepository;
delete fCommonRepository;
delete fHomeRepository;
}
@ -85,10 +82,8 @@ BPackageManager::Init(uint32 flags)
if (error != B_OK)
DIE(error, "failed to create solver");
if (fSystemRepository == NULL || fCommonRepository == NULL
|| fHomeRepository == NULL) {
if (fSystemRepository == NULL || fHomeRepository == NULL)
throw std::bad_alloc();
}
// add installation location repositories
if ((flags & B_ADD_INSTALLED_REPOSITORIES) != 0) {
@ -103,12 +98,8 @@ BPackageManager::Init(uint32 flags)
// well. But we can easily filter those out.
_AddInstalledRepository(fSystemRepository);
if (!fSystemRepository->IsInstalled()) {
_AddInstalledRepository(fCommonRepository);
if (!fCommonRepository->IsInstalled())
_AddInstalledRepository(fHomeRepository);
}
if (!fSystemRepository->IsInstalled())
_AddInstalledRepository(fHomeRepository);
}
// add other repositories
@ -597,8 +588,6 @@ BPackageManager::_ClonePackageFile(InstalledRepository* repository,
directory_which packagesWhich;
if (repository == fSystemRepository) {
packagesWhich = B_SYSTEM_PACKAGES_DIRECTORY;
} else if (repository == fCommonRepository) {
packagesWhich = B_COMMON_PACKAGES_DIRECTORY;
} else {
DIE("don't know packages directory path for installation location "
"\"%s\"", repository->Name().String());
@ -732,15 +721,8 @@ bool
BPackageManager::_NextSpecificInstallationLocation()
{
if (fLocation == B_PACKAGE_INSTALLATION_LOCATION_SYSTEM) {
fLocation = B_PACKAGE_INSTALLATION_LOCATION_COMMON;
fSystemRepository->SetInstalled(false);
_AddInstalledRepository(fCommonRepository);
return true;
}
if (fLocation == B_PACKAGE_INSTALLATION_LOCATION_COMMON) {
fLocation = B_PACKAGE_INSTALLATION_LOCATION_HOME;
fCommonRepository->SetInstalled(false);
fSystemRepository->SetInstalled(false);
_AddInstalledRepository(fHomeRepository);
return true;
}

View File

@ -121,12 +121,6 @@ BSolverRepository::SetTo(BAllInstallationLocations)
if (error != B_OK)
return error;
error = AddPackages(B_PACKAGE_INSTALLATION_LOCATION_COMMON);
if (error != B_OK) {
Unset();
return error;
}
error = AddPackages(B_PACKAGE_INSTALLATION_LOCATION_HOME);
if (error != B_OK) {
Unset();

View File

@ -73,8 +73,7 @@ status_t PrintTransport::Open(BNode* printerFolder)
const directory_which paths[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};
BPath path;

View File

@ -406,8 +406,7 @@ BPrinter::_DriverPath() const
directory_which directories[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -170,12 +170,7 @@ PrinterDriverAddOn::FindPathToDriver(const char* driver, BPath* path)
return B_OK;
result = ::TestForAddonExistence(driver,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY, kPrinterDriverFolderName, *path);
if (result == B_OK)
return B_OK;
result = ::TestForAddonExistence(driver, B_COMMON_ADDONS_DIRECTORY,
kPrinterDriverFolderName, *path);
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY, kPrinterDriverFolderName, *path);
if (result == B_OK)
return B_OK;

View File

@ -123,8 +123,7 @@ ScreenSaverRunner::_LoadAddOn()
directory_which which[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};
BPath path;

View File

@ -38,8 +38,7 @@
static const directory_which kAddOnDirs[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};
/*! \brief Size of the kAddOnDirs array. */

View File

@ -118,12 +118,9 @@ DiskSystemAddOnManager::LoadDiskSystems()
if (error == B_OK) {
error
= _LoadAddOns(alreadyLoaded, B_COMMON_NONPACKAGED_ADDONS_DIRECTORY);
= _LoadAddOns(alreadyLoaded, B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY);
}
if (error == B_OK)
error = _LoadAddOns(alreadyLoaded, B_COMMON_ADDONS_DIRECTORY);
if (error == B_OK)
error = _LoadAddOns(alreadyLoaded, B_SYSTEM_ADDONS_DIRECTORY);

View File

@ -91,8 +91,7 @@ static const directory_which kBaseDirectoryConstants[] = {
B_USER_SETTINGS_DIRECTORY,
B_USER_NONPACKAGED_DATA_DIRECTORY,
B_USER_DATA_DIRECTORY,
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
B_COMMON_DATA_DIRECTORY,
B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
B_SYSTEM_DATA_DIRECTORY
};

View File

@ -274,8 +274,7 @@ BDeskWindow::InitAddonsList(bool update)
LoadAddOnDir(B_USER_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
LoadAddOnDir(B_USER_ADDONS_DIRECTORY, this, fAddonsList);
LoadAddOnDir(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
LoadAddOnDir(B_COMMON_ADDONS_DIRECTORY, this, fAddonsList);
LoadAddOnDir(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
LoadAddOnDir(B_SYSTEM_ADDONS_DIRECTORY, this, fAddonsList);
}
}
@ -325,13 +324,7 @@ BDeskWindow::ApplyShortcutPreferences(bool update)
isInAddons = command.FindFirst(path.Path()) == 0;
}
if (!isInAddons
&& (find_directory(B_COMMON_ADDONS_DIRECTORY, &path)
== B_OK)) {
path.Append("Tracker/");
isInAddons = command.FindFirst(path.Path()) == 0;
}
if (!isInAddons
&& (find_directory(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
&& (find_directory(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
&path) == B_OK)) {
path.Append("Tracker/");
isInAddons = command.FindFirst(path.Path()) == 0;

View File

@ -658,12 +658,12 @@ ConfirmChangeIfWellKnownDirectory(const BEntry* entry,
"\n\nTo %toDoAction the home folder anyway, hold down the "
"Shift key and click \"%toConfirmAction\"."));
} else if (DirectoryMatchesOrContains(entry, B_USER_CONFIG_DIRECTORY)
|| DirectoryMatchesOrContains(entry, B_COMMON_SETTINGS_DIRECTORY)) {
|| DirectoryMatchesOrContains(entry, B_SYSTEM_SETTINGS_DIRECTORY)) {
if (DirectoryMatchesOrContains(entry, "beos_mime",
B_USER_SETTINGS_DIRECTORY)
|| DirectoryMatchesOrContains(entry, "beos_mime",
B_COMMON_SETTINGS_DIRECTORY)) {
B_SYSTEM_SETTINGS_DIRECTORY)) {
warning.SetTo(
B_TRANSLATE("If you %ifYouDoAction the mime settings, "
"%osName may not behave properly!\n\nAre you sure you want "
@ -676,7 +676,7 @@ ConfirmChangeIfWellKnownDirectory(const BEntry* entry,
"to do this?"));
requireOverride = false;
} else if (DirectoryMatches(entry, B_USER_SETTINGS_DIRECTORY)
|| DirectoryMatches(entry, B_COMMON_SETTINGS_DIRECTORY)) {
|| DirectoryMatches(entry, B_SYSTEM_SETTINGS_DIRECTORY)) {
warning.SetTo(
B_TRANSLATE("If you %ifYouDoAction the settings folder, "
"%osName may not behave properly!\n\nAre you sure you want "

View File

@ -332,8 +332,7 @@ BTranslatorRoster::Private::AddDefaultPaths()
const directory_which paths[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};

View File

@ -44,8 +44,7 @@ Transport::Transport(const PrinterData *printerData)
const directory_which paths[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_BEOS_ADDONS_DIRECTORY,
};
BPath path;

View File

@ -558,7 +558,7 @@ JoyWin::_FindSettingString(const char* name, const char* strPath)
path.Append(name);
fFileTempProbeJoystick = new BFile(path.Path(), B_READ_ONLY);
//status_t err = find_directory(B_COMMON_ETC_DIRECTORY, &path);
//status_t err = find_directory(B_SYSTEM_ETC_DIRECTORY, &path);
// if (err == B_OK) {
//BString str(path.Path());
//str << "/joysticks/" << name;

View File

@ -165,7 +165,7 @@ DNSTools::GetDNSServers(BObjectList<BString>* serverList)
line[sizeof(name) - 1] == '\t'))
BPath path;
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) != B_OK)
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) != B_OK)
return B_ENTRY_NOT_FOUND;
path.Append("network/resolv.conf");

View File

@ -489,7 +489,7 @@ void
EthernetSettingsView::_SaveDNSConfiguration()
{
BPath path;
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) != B_OK)
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) != B_OK)
return;
path.Append("network/resolv.conf");
@ -610,7 +610,7 @@ EthernetSettingsView::_TriggerAutoConfig(const char* device)
status_t
EthernetSettingsView::_GetPath(const char* name, BPath& path)
{
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path, true) != B_OK)
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, true) != B_OK)
return B_ERROR;
path.Append("network");

View File

@ -287,8 +287,7 @@ AddPrinterDialog::_BuildGUI(int stage)
static directory_which gAddonDirs[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};

View File

@ -712,8 +712,7 @@ ModulesView::PopulateScreenSaverList()
directory_which which[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY,
};
ScreenSaverItem* selectedItem = NULL;

View File

@ -467,8 +467,7 @@ DWindowHWInterface::_OpenAccelerant(int device)
const static directory_which dirs[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -275,8 +275,7 @@ AccelerantHWInterface::_OpenAccelerant(int device)
const static directory_which dirs[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -334,8 +334,7 @@ IndexServer::_StartWatchingAddOns()
const directory_which directories[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -262,8 +262,7 @@ AddOnManager::_RegisterAddOns()
const directory_which directories[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};
const char* subDirectories[] = {

View File

@ -60,8 +60,7 @@ private:
static const directory_which sDirectories[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -296,8 +296,7 @@ MediaAddonServer::ReadyToRun()
const directory_which directories[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -705,7 +705,7 @@ NetServer::_ConfigureResolver(BMessage& resolverConfiguration)
// the auto-generated parts of course.
BPath path;
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) != B_OK
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) != B_OK
|| path.Append("network/resolv.conf") != B_OK)
return B_ERROR;

View File

@ -354,7 +354,7 @@ Settings::_Path(BPath& parent, const char* leaf)
status_t
Settings::_GetPath(const char* name, BPath& path)
{
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path, true) != B_OK)
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, true) != B_OK)
return B_ERROR;
path.Append("network");

View File

@ -84,7 +84,6 @@ Root::Root()
fIsSystemRoot(false),
fPath(),
fSystemVolume(NULL),
fCommonVolume(NULL),
fHomeVolume(NULL),
fJobQueue(),
fJobRunner(-1)
@ -209,7 +208,7 @@ Root::FindVolume(dev_t deviceID) const
{
AutoLocker<BLocker> locker(fLock);
Volume* volumes[] = { fSystemVolume, fCommonVolume, fHomeVolume };
Volume* volumes[] = { fSystemVolume, fHomeVolume };
for (size_t i = 0; i < sizeof(volumes) / sizeof(volumes[0]); i++) {
Volume* volume = volumes[i];
if (volume != NULL && volume->DeviceID() == deviceID)
@ -226,8 +225,6 @@ Root::GetVolume(BPackageInstallationLocation location)
switch ((BPackageInstallationLocation)location) {
case B_PACKAGE_INSTALLATION_LOCATION_SYSTEM:
return fSystemVolume;
case B_PACKAGE_INSTALLATION_LOCATION_COMMON:
return fCommonVolume;
case B_PACKAGE_INSTALLATION_LOCATION_HOME:
return fHomeVolume;
default:
@ -269,8 +266,6 @@ Root::_GetVolume(PackageFSMountType mountType)
switch (mountType) {
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
return &fSystemVolume;
case PACKAGE_FS_MOUNT_TYPE_COMMON:
return &fCommonVolume;
case PACKAGE_FS_MOUNT_TYPE_HOME:
return &fHomeVolume;
case PACKAGE_FS_MOUNT_TYPE_CUSTOM:
@ -291,9 +286,6 @@ Root::_NextVolumeFor(Volume* volume)
do {
switch (mountType) {
case PACKAGE_FS_MOUNT_TYPE_HOME:
mountType = PACKAGE_FS_MOUNT_TYPE_COMMON;
break;
case PACKAGE_FS_MOUNT_TYPE_COMMON:
mountType = PACKAGE_FS_MOUNT_TYPE_SYSTEM;
break;
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:

View File

@ -82,7 +82,6 @@ private:
bool fIsSystemRoot;
BString fPath;
Volume* fSystemVolume;
Volume* fCommonVolume;
Volume* fHomeVolume;
JobQueue fJobQueue;
thread_id fJobRunner;

View File

@ -1691,8 +1691,6 @@ Volume::Location() const
switch (fMountType) {
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
return B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
case PACKAGE_FS_MOUNT_TYPE_COMMON:
return B_PACKAGE_INSTALLATION_LOCATION_COMMON;
case PACKAGE_FS_MOUNT_TYPE_HOME:
return B_PACKAGE_INSTALLATION_LOCATION_HOME;
case PACKAGE_FS_MOUNT_TYPE_CUSTOM:

View File

@ -109,8 +109,7 @@ PrintServerApp::PrintServerApp(status_t* err)
// Build list of transport addons
Transport::Scan(B_USER_NONPACKAGED_ADDONS_DIRECTORY);
Transport::Scan(B_USER_ADDONS_DIRECTORY);
Transport::Scan(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY);
Transport::Scan(B_COMMON_ADDONS_DIRECTORY);
Transport::Scan(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY);
Transport::Scan(B_SYSTEM_ADDONS_DIRECTORY);
SetupPrinterList();

View File

@ -51,7 +51,7 @@ void
SyslogDaemon::AboutRequested()
{
BPath path;
find_directory(B_COMMON_LOG_DIRECTORY, &path);
find_directory(B_SYSTEM_LOG_DIRECTORY, &path);
path.Append("syslog");
BString name(B_TRANSLATE("Syslog Daemon"));

View File

@ -64,7 +64,7 @@ prepare_output()
// get path (and create it if necessary)
BPath base;
find_directory(B_COMMON_LOG_DIRECTORY, &base, true);
find_directory(B_SYSTEM_LOG_DIRECTORY, &base, true);
BPath syslog(base);
syslog.Append("syslog");

View File

@ -508,7 +508,7 @@ get_priority(const char* path)
// using find_directory()?
const directory_which whichPath[] = {
B_BEOS_DIRECTORY,
B_COMMON_DIRECTORY,
B_SYSTEM_NONPACKAGED_DIRECTORY,
B_USER_DIRECTORY
};
KPath pathBuffer;
@ -940,8 +940,9 @@ DirectoryIterator::SetTo(const char* path, const char* subPath, bool recursive)
if (path == NULL) {
// add default paths
const directory_which whichPath[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_BEOS_ADDONS_DIRECTORY
};
KPath pathBuffer;
@ -1479,8 +1480,9 @@ legacy_driver_probe(const char* subPath)
// We're probing the actual boot volume for the first time,
// let's watch its driver directories for changes
const directory_which whichPath[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_BEOS_ADDONS_DIRECTORY
};
KPath path;

View File

@ -285,8 +285,9 @@ using namespace Module;
*/
static const directory_which kModulePaths[] = {
B_BEOS_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
};
static const uint32 kNumModulePaths = sizeof(kModulePaths)

View File

@ -18,7 +18,7 @@
static status_t
get_path(char *path, bool create)
{
status_t status = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, create,
status_t status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, create,
path, B_PATH_NAME_LENGTH);
if (status != B_OK)
return status;

View File

@ -766,7 +766,7 @@ load_driver_settings(const char *driverName)
#ifdef _BOOT_MODE
strcpy(path, kUserSettingsDirectory);
#else
// TODO: use B_COMMON_SETTINGS_DIRECTORY instead!
// TODO: use B_SYSTEM_SETTINGS_DIRECTORY instead!
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, path,
sizeof(path)) == B_OK)
#endif

View File

@ -82,15 +82,15 @@ static const char *kCommonDirectories[] = {
COMMON "/documentation",
COMMON "/settings",
COMMON "/develop", // B_COMMON_DEVELOP_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 "/var/log", // B_SYSTEM_LOG_DIRECTORY
COMMON "/var/spool", // B_SYSTEM_SPOOL_DIRECTORY
COMMON "/cache/tmp", // B_SYSTEM_TEMP_DIRECTORY
COMMON "/var", // B_SYSTEM_VAR_DIRECTORY
COMMON "/add-ons/Translators",
COMMON "/add-ons/media",
COMMON "/data/sounds",
COMMON "/data",
COMMON "/cache", // B_COMMON_CACHE_DIRECTORY
COMMON "/cache", // B_SYSTEM_CACHE_DIRECTORY
COMMON "/packages",
COMMON "/develop/headers",
COMMON NON_PACKAGED,
@ -283,33 +283,33 @@ find_directory(directory_which which, dev_t device, bool createIt,
case B_COMMON_LIB_DIRECTORY:
case B_COMMON_SERVERS_DIRECTORY:
case B_COMMON_BIN_DIRECTORY:
case B_COMMON_ETC_DIRECTORY:
case B_SYSTEM_ETC_DIRECTORY:
case B_COMMON_DOCUMENTATION_DIRECTORY:
case B_COMMON_SETTINGS_DIRECTORY:
case B_SYSTEM_SETTINGS_DIRECTORY:
case B_COMMON_DEVELOP_DIRECTORY:
case B_COMMON_LOG_DIRECTORY:
case B_COMMON_SPOOL_DIRECTORY:
case B_COMMON_TEMP_DIRECTORY:
case B_COMMON_VAR_DIRECTORY:
case B_SYSTEM_LOG_DIRECTORY:
case B_SYSTEM_SPOOL_DIRECTORY:
case B_SYSTEM_TEMP_DIRECTORY:
case B_SYSTEM_VAR_DIRECTORY:
case B_COMMON_TRANSLATORS_DIRECTORY:
case B_COMMON_MEDIA_NODES_DIRECTORY:
case B_COMMON_SOUNDS_DIRECTORY:
case B_COMMON_DATA_DIRECTORY:
case B_COMMON_CACHE_DIRECTORY:
case B_SYSTEM_CACHE_DIRECTORY:
case B_COMMON_PACKAGES_DIRECTORY:
case B_COMMON_HEADERS_DIRECTORY:
case B_COMMON_NONPACKAGED_DIRECTORY:
case B_COMMON_NONPACKAGED_ADDONS_DIRECTORY:
case B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY:
case B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY:
case B_COMMON_NONPACKAGED_BIN_DIRECTORY:
case B_COMMON_NONPACKAGED_DATA_DIRECTORY:
case B_COMMON_NONPACKAGED_FONTS_DIRECTORY:
case B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY:
case B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY:
case B_COMMON_NONPACKAGED_LIB_DIRECTORY:
case B_COMMON_NONPACKAGED_HEADERS_DIRECTORY:
case B_COMMON_NONPACKAGED_DEVELOP_DIRECTORY:
case B_SYSTEM_NONPACKAGED_DIRECTORY:
case B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY:
case B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY:
case B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY:
case B_SYSTEM_NONPACKAGED_BIN_DIRECTORY:
case B_SYSTEM_NONPACKAGED_DATA_DIRECTORY:
case B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY:
case B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY:
case B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY:
case B_SYSTEM_NONPACKAGED_LIB_DIRECTORY:
case B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY:
case B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY:
templatePath = kCommonDirectories[which - B_COMMON_DIRECTORY];
break;

View File

@ -18,7 +18,7 @@
static status_t
get_path(char *path, bool create)
{
status_t status = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, create,
status_t status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, create,
path, B_PATH_NAME_LENGTH);
if (status != B_OK)
return status;

View File

@ -808,7 +808,7 @@ void recordLogin(char *server, char *share, char *client, bool authenticated)
return;
// Obtain the filename for the log file.
find_directory(B_COMMON_LOG_DIRECTORY, 0, false, path, sizeof(path));
find_directory(B_SYSTEM_LOG_DIRECTORY, 0, false, path, sizeof(path));
strcat(path, "/BeServed-Logins.log");
// Build the time stamp.

View File

@ -31,7 +31,7 @@
#define WSTAT_MTIME 0x0020
#define WSTAT_CRTIME 0x0040
#define B_COMMON_SETTINGS_DIRECTORY ".\\"
#define B_SYSTEM_SETTINGS_DIRECTORY ".\\"
#define B_COMMON_SYSTEM_DIRECTORY ".\\"
#define ENOTSUP 1

View File

@ -1604,7 +1604,7 @@ class FileSharingWindow : public BWindow
fileShares[i].next = NULL;
}
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
strcat(path, "/BeServed-Settings");
fp = fopen(path, "r");
@ -1884,7 +1884,7 @@ class FileSharingWindow : public BWindow
char path[B_PATH_NAME_LENGTH + 1];
int i;
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
strcat(path, "/BeServed-Settings");
fp = fopen(path, "w");

View File

@ -604,7 +604,7 @@ void initShares()
fileShares[i].next = NULL;
}
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
strcat(path, "/BeServed-Settings");
fp = fopen(path, "r");

View File

@ -31,7 +31,7 @@
#define WSTAT_MTIME 0x0020
#define WSTAT_CRTIME 0x0040
#define B_COMMON_SETTINGS_DIRECTORY ".\\"
#define B_SYSTEM_SETTINGS_DIRECTORY ".\\"
#define B_COMMON_SYSTEM_DIRECTORY ".\\"
#define ENOTSUP 1

View File

@ -758,7 +758,7 @@ void initShares()
fileShares[i].next = NULL;
}
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
strcat(path, "/BeServed-Settings");
fp = fopen(path, "r");

View File

@ -71,8 +71,7 @@ int main (int argc, char *argv[])
directory_which which[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};
BPath path;

View File

@ -217,7 +217,7 @@ NetworkSettings::ReadConfiguration()
fWirelessNetwork.SetTo(NULL);
BPath path;
find_directory(B_COMMON_SETTINGS_DIRECTORY, &path);
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path);
path.Append("network");
path.Append("interfaces");

View File

@ -43,14 +43,14 @@ const directory_which directories[] = {
B_COMMON_LIB_DIRECTORY,
B_COMMON_SERVERS_DIRECTORY,
B_COMMON_BIN_DIRECTORY,
B_COMMON_ETC_DIRECTORY,
B_SYSTEM_ETC_DIRECTORY,
B_COMMON_DOCUMENTATION_DIRECTORY,
B_COMMON_SETTINGS_DIRECTORY,
B_SYSTEM_SETTINGS_DIRECTORY,
B_COMMON_DEVELOP_DIRECTORY,
B_COMMON_LOG_DIRECTORY,
B_COMMON_SPOOL_DIRECTORY,
B_COMMON_TEMP_DIRECTORY,
B_COMMON_VAR_DIRECTORY,
B_SYSTEM_LOG_DIRECTORY,
B_SYSTEM_SPOOL_DIRECTORY,
B_SYSTEM_TEMP_DIRECTORY,
B_SYSTEM_VAR_DIRECTORY,
B_COMMON_TRANSLATORS_DIRECTORY,
B_COMMON_MEDIA_NODES_DIRECTORY,
B_COMMON_SOUNDS_DIRECTORY,
@ -249,28 +249,28 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
case B_COMMON_BIN_DIRECTORY:
error = path.SetTo("/boot/home/config/bin");
break;
case B_COMMON_ETC_DIRECTORY:
case B_SYSTEM_ETC_DIRECTORY:
error = path.SetTo("/boot/home/config/etc");
break;
case B_COMMON_DOCUMENTATION_DIRECTORY:
error = path.SetTo("/boot/home/config/documentation");
break;
case B_COMMON_SETTINGS_DIRECTORY:
case B_SYSTEM_SETTINGS_DIRECTORY:
error = path.SetTo("/boot/home/config/settings");
break;
case B_COMMON_DEVELOP_DIRECTORY:
error = path.SetTo("/boot/develop");
break;
case B_COMMON_LOG_DIRECTORY:
case B_SYSTEM_LOG_DIRECTORY:
error = path.SetTo("/boot/var/log");
break;
case B_COMMON_SPOOL_DIRECTORY:
case B_SYSTEM_SPOOL_DIRECTORY:
error = path.SetTo("/boot/var/spool");
break;
case B_COMMON_TEMP_DIRECTORY:
case B_SYSTEM_TEMP_DIRECTORY:
error = path.SetTo("/boot/var/tmp");
break;
case B_COMMON_VAR_DIRECTORY:
case B_SYSTEM_VAR_DIRECTORY:
error = path.SetTo("/boot/var");
break;
case B_COMMON_TRANSLATORS_DIRECTORY:

View File

@ -201,8 +201,7 @@ AccelerantHWInterface::_OpenAccelerant(int device)
const static directory_which dirs[] = {
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
B_USER_ADDONS_DIRECTORY,
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
B_COMMON_ADDONS_DIRECTORY,
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
B_SYSTEM_ADDONS_DIRECTORY
};

View File

@ -5,7 +5,7 @@
# e.g.,
# haiku/trunk/docs> sh ../src/tools/propset-files.sh
tmpDir="`finddir B_COMMON_TEMP_DIRECTORY`"
tmpDir="`finddir B_SYSTEM_TEMP_DIRECTORY`"
tmpFile="${tmpDir}/propset-html"
find . -type d -name .svn -prune -o -print > "$tmpFile"