+ Updated entry_ref_is_root_dir() to Be style calling conventions
+ Added device_is_root_device() call git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1322 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -321,7 +321,10 @@ status_t get_canonical_dir_path(const char *path, char *&result);
|
|||||||
status_t get_app_path(char *buffer);
|
status_t get_app_path(char *buffer);
|
||||||
|
|
||||||
/*! Returns true if the given entry_ref represents the root directory, false otherwise. */
|
/*! Returns true if the given entry_ref represents the root directory, false otherwise. */
|
||||||
bool entry_ref_is_root_dir(entry_ref &ref);
|
bool entry_ref_is_root_dir(const entry_ref *ref);
|
||||||
|
|
||||||
|
//! Returns true if the given device is the root device, false otherwise
|
||||||
|
bool device_is_root_device(dev_t device);
|
||||||
|
|
||||||
/*! Renames oldPath to newPath, replacing newPath if it exists. */
|
/*! Renames oldPath to newPath, replacing newPath if it exists. */
|
||||||
status_t rename(const char *oldPath, const char *newPath);
|
status_t rename(const char *oldPath, const char *newPath);
|
||||||
|
|||||||
@@ -1126,10 +1126,15 @@ BPrivate::Storage::get_app_path(char *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BPrivate::Storage::entry_ref_is_root_dir( entry_ref &ref )
|
BPrivate::Storage::entry_ref_is_root_dir( const entry_ref *ref )
|
||||||
{
|
{
|
||||||
return ref.directory == 1 && ref.device == 1 && ref.name[0] == '.'
|
return ref && ref->directory == 1 && ref->device == 1 && ref->name[0] == '.'
|
||||||
&& ref.name[1] == 0;
|
&& ref->name[1] == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
BPrivate::Storage::device_is_root_device(dev_t device) {
|
||||||
|
return device == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
|
|||||||
Reference in New Issue
Block a user