We don't need ufs_mount anymore. One can simply use mount:
mount -t userlandfs -p "<client FS> <client FS params>" ... The parameters may change later in order to become a proper driver settings string. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20310 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6a15f740b9
commit
2660a88261
@ -2,4 +2,3 @@ SubDir HAIKU_TOP src add-ons kernel file_systems userlandfs ;
|
||||
|
||||
SubInclude HAIKU_TOP src add-ons kernel file_systems userlandfs kernel_add_on ;
|
||||
SubInclude HAIKU_TOP src add-ons kernel file_systems userlandfs server ;
|
||||
#SubInclude HAIKU_TOP src add-ons kernel file_systems userlandfs ufs_mount ;
|
||||
|
@ -1,15 +0,0 @@
|
||||
SubDir HAIKU_TOP src tests add-ons kernel file_systems userlandfs r5 src
|
||||
ufs_mount ;
|
||||
|
||||
SetSubDirSupportedPlatforms r5 bone dano ;
|
||||
|
||||
local userlandFSTop = [ FDirName $(HAIKU_TOP) src tests add-ons kernel
|
||||
file_systems userlandfs r5 ] ;
|
||||
local userlandFSIncludes = [ FDirName $(userlandFSTop) headers ] ;
|
||||
|
||||
SubDirHdrs [ FDirName $(userlandFSIncludes) private ] ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(userlandFSTop) src shared ] ;
|
||||
|
||||
Application <test>ufs_mount : ufs_mount.cpp : be ;
|
||||
|
@ -1,50 +0,0 @@
|
||||
// ufs_mount.cpp
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <String.h>
|
||||
|
||||
const char* kUsage =
|
||||
"Usage: ufs_mount <file system> <device> <mount point> [ <parameters> ]\n"
|
||||
;
|
||||
|
||||
// print_usage
|
||||
void
|
||||
print_usage(bool error = true)
|
||||
{
|
||||
fprintf((error ? stderr : stdout), kUsage);
|
||||
}
|
||||
|
||||
// main
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
// check and get the parameters
|
||||
if (argc < 4 || argc > 5) {
|
||||
print_usage();
|
||||
return 1;
|
||||
}
|
||||
const char* fileSystem = argv[1];
|
||||
const char* device = argv[2];
|
||||
const char* mountPoint = argv[3];
|
||||
const char* fsParameters = (argc >= 5 ? argv[4] : NULL);
|
||||
// get prepare the parameters for the mount() call
|
||||
if (strlen(device) == 0)
|
||||
device = NULL;
|
||||
BString parameters(fileSystem);
|
||||
if (fsParameters)
|
||||
parameters << ' ' << fsParameters;
|
||||
// mount
|
||||
ulong flags = 0;
|
||||
printf("mount('userlandfs', '%s', '%s', %lu, '%s', %ld)\n", mountPoint, device,
|
||||
flags, parameters.String(), parameters.Length() + 1);
|
||||
if (mount("userlandfs", mountPoint, device, flags,
|
||||
(void*)parameters.String(), parameters.Length() + 1) < 0) {
|
||||
fprintf(stderr, "mounting failed: %s\n", strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user