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) {
|
||||
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 interface ] : true ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers build os storage ] : true ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
|
||||
}
|
||||
@ -80,6 +78,8 @@ BuildPlatformStaticLibrary <build>fs_shell.a :
|
||||
$(externalCommandsSources)
|
||||
|
||||
fssh.cpp
|
||||
fssh_additional_commands.cpp
|
||||
|
||||
: <build>fs_shell_kernel.o
|
||||
;
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "compatibility.h"
|
||||
|
||||
#include "fssh.h"
|
||||
@ -1471,6 +1472,7 @@ standard_session(const char* device, const char* fsName, bool interactive)
|
||||
|
||||
// register commands
|
||||
register_commands();
|
||||
register_additional_commands();
|
||||
|
||||
// process commands
|
||||
input_loop(interactive);
|
||||
|
@ -5,6 +5,7 @@
|
||||
#ifndef _FSSH_FSSH_H
|
||||
#define _FSSH_FSSH_H
|
||||
|
||||
|
||||
#include "compatibility.h"
|
||||
|
||||
#include <map>
|
||||
@ -71,6 +72,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
extern void register_additional_commands(void);
|
||||
|
||||
|
||||
} // 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…
Reference in New Issue
Block a user