fixed btrfs_shell

Change-Id: I792661b62d896f105690500403650b174a649de6
This commit is contained in:
brjhaiku 2019-06-29 03:03:18 +05:30 committed by Adrien Destugues
parent bc6dc61fb9
commit 7868a011b8
6 changed files with 46 additions and 8 deletions

View File

@ -12,8 +12,8 @@
#if !USER
# include <KernelExport.h>
# include <OS.h>
#endif
#include <OS.h>
#include <SupportDefs.h>

View File

@ -12,6 +12,9 @@
#endif
#include <stdlib.h>
#undef __THROW
#define __THROW
#include "fssh_dirent.h"
#include "fssh_errno.h"
#include "fssh_fcntl.h"

View File

@ -50,16 +50,15 @@ struct fssh_tm {
};
#ifdef __cplusplus
extern "C" {
#endif
/* special timezone support */
extern char *fssh_tzname[2];
extern int fssh_daylight;
extern long fssh_timezone;
#ifdef __cplusplus
extern "C" {
#endif
extern fssh_clock_t fssh_clock(void);
extern double fssh_difftime(fssh_time_t time1, fssh_time_t time2);
extern fssh_time_t fssh_mktime(struct fssh_tm *tm);

View File

@ -10,8 +10,9 @@
// This needs to be included before the fs_shell wrapper
#include <zlib.h>
#include <new>
#include <util/AVLTree.h>
#include <uuid.h>
#include "fssh_api_wrapper.h"
#include "fssh_auto_deleter.h"

View File

@ -13,6 +13,8 @@
#include <string.h>
#include <unistd.h>
#ifdef __HAIKU__
#include <OS.h>
@ -110,6 +112,30 @@ dbg_printf_unlock()
}
}
#else
status_t
init_debugging()
{
status_t error = B_OK;
return error;
}
status_t
exit_debugging()
{
status_t error = B_OK;
return error;
}
static inline bool
dbg_printf_lock()
{
return true;
}
static inline void
dbg_printf_unlock(){}
#endif
void
dbg_printf_begin()

View File

@ -10,6 +10,7 @@ DEFINES += HAIKU_BUILD_COMPATIBILITY_H ;
local defines =
FS_SHELL
TRACE_BTRFS # ENABLE DEBUGGING
USER=1
;
defines = [ FDefines $(defines) ] ;
@ -25,14 +26,18 @@ if ! $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
fsShellCommandLibs = $(HOST_NETWORK_LIBS) ;
}
UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build os support ] : true ;
UsePrivateKernelHeaders ;
UsePrivateHeaders shared storage fs_shell ;
UsePrivateHeaders file_systems ;
UseHeaders [ FDirName $(HAIKU_TOP) headers private ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) src tools fs_shell ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src libs uuid ] : true ;
local btrfsSources =
Attribute.cpp
@ -40,11 +45,13 @@ local btrfsSources =
BTree.cpp
Chunk.cpp
CRCTable.cpp
DebugSupport.cpp
DirectoryIterator.cpp
ExtentAllocator.cpp
Inode.cpp
Journal.cpp
Volume.cpp
btrfs_disk_system.cpp
kernel_interface.cpp
;
@ -60,8 +67,10 @@ BuildPlatformMain <build>btrfs_shell
:
<build>btrfs.o
<build>fs_shell.a $(HOST_LIBSUPC++) $(HOST_LIBSTDC++)
$(HOST_LIBROOT) $(fsShellCommandLibs)
$(HOST_LIBROOT) $(fsShellCommandLibs) uuid
;
SEARCH on [ FGristFiles $(utilitySources) ]
+= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
SEARCH on [ FGristFiles DebugSupport.cpp ]
+= [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems shared ] ;