mirror of
https://review.haiku-os.org/haiku
synced 2025-01-21 13:54:49 +01:00
Implemented support for file system specific commands.
* File system specific shell implementations can now register any additional commands by implementing the register_additional_commands() function.
This commit is contained in:
parent
a697ddedc5
commit
360a644650
@ -4,9 +4,7 @@ UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
|
|||||||
|
|
||||||
if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) {
|
if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) {
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
|
||||||
#UseHeaders [ FDirName $(HAIKU_TOP) headers build os app ] : true ;
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers build os kernel ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers build os kernel ] : true ;
|
||||||
#UseHeaders [ FDirName $(HAIKU_TOP) headers build os interface ] : true ;
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
|
||||||
}
|
}
|
||||||
@ -80,6 +78,8 @@ BuildPlatformStaticLibrary <build>fs_shell.a :
|
|||||||
$(externalCommandsSources)
|
$(externalCommandsSources)
|
||||||
|
|
||||||
fssh.cpp
|
fssh.cpp
|
||||||
|
fssh_additional_commands.cpp
|
||||||
|
|
||||||
: <build>fs_shell_kernel.o
|
: <build>fs_shell_kernel.o
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "compatibility.h"
|
#include "compatibility.h"
|
||||||
|
|
||||||
#include "fssh.h"
|
#include "fssh.h"
|
||||||
@ -1471,6 +1472,7 @@ standard_session(const char* device, const char* fsName, bool interactive)
|
|||||||
|
|
||||||
// register commands
|
// register commands
|
||||||
register_commands();
|
register_commands();
|
||||||
|
register_additional_commands();
|
||||||
|
|
||||||
// process commands
|
// process commands
|
||||||
input_loop(interactive);
|
input_loop(interactive);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#ifndef _FSSH_FSSH_H
|
#ifndef _FSSH_FSSH_H
|
||||||
#define _FSSH_FSSH_H
|
#define _FSSH_FSSH_H
|
||||||
|
|
||||||
|
|
||||||
#include "compatibility.h"
|
#include "compatibility.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -71,6 +72,9 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern void register_additional_commands(void);
|
||||||
|
|
||||||
|
|
||||||
} // namespace FSShell
|
} // namespace FSShell
|
||||||
|
|
||||||
|
|
||||||
|
20
src/tools/fs_shell/fssh_additional_commands.cpp
Normal file
20
src/tools/fs_shell/fssh_additional_commands.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2012, Axel Dörfler, axeld@pinc-software.de.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "fssh.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace FSShell {
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
register_additional_commands()
|
||||||
|
{
|
||||||
|
// To be implemented by file system specific shell implementations.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace FSShell
|
Loading…
x
Reference in New Issue
Block a user