mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 15:21:30 +02:00
Bootstrappable builds (WIP) [2]
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index f0d7cde..70c4aa0 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -14,6 +14,7 @@ bin_PROGRAMS =
|
||||
noinst_PROGRAMS =
|
||||
|
||||
noinst_LTLIBRARIES = libsquashfuse.la
|
||||
+noinst_LTLIBRARIES += libsquashfuse_ll.la
|
||||
|
||||
# Main library: libsquashfuse
|
||||
libsquashfuse_la_SOURCES = swap.c cache.c table.c dir.c file.c fs.c \
|
||||
@@ -46,10 +47,9 @@ endif
|
||||
|
||||
# Low-level squashfuse_ll, if supported
|
||||
if SQ_WANT_LOWLEVEL
|
||||
-bin_PROGRAMS += squashfuse_ll
|
||||
-squashfuse_ll_SOURCES = ll.c ll_inode.c nonstd-daemon.c ll.h
|
||||
-squashfuse_ll_CPPFLAGS = $(FUSE_CPPFLAGS)
|
||||
-squashfuse_ll_LDADD = libsquashfuse.la libfuseprivate.la $(COMPRESSION_LIBS) \
|
||||
+libsquashfuse_ll_la_SOURCES = ll.c ll_inode.c nonstd-daemon.c ll.h
|
||||
+libsquashfuse_ll_la_CPPFLAGS = $(FUSE_CPPFLAGS)
|
||||
+libsquashfuse_ll_la_LIBADD = libsquashfuse.la libfuseprivate.la $(COMPRESSION_LIBS) \
|
||||
$(FUSE_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES += libfuseprivate.la
|
||||
diff --git a/ll.c b/ll.c
|
||||
index a2c7902..8fcb3f4 100644
|
||||
--- a/ll.c
|
||||
+++ b/ll.c
|
||||
@@ -390,7 +390,7 @@ static sqfs_ll *sqfs_ll_open(const char *path, size_t offset) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-int main(int argc, char *argv[]) {
|
||||
+int fusefs_main(int argc, char *argv[], void (*mounted) (void)) {
|
||||
struct fuse_args args;
|
||||
sqfs_opts opts;
|
||||
|
||||
@@ -451,6 +451,8 @@ int main(int argc, char *argv[]) {
|
||||
if (sqfs_ll_daemonize(fg) != -1) {
|
||||
if (fuse_set_signal_handlers(se) != -1) {
|
||||
fuse_session_add_chan(se, ch.ch);
|
||||
+ if (mounted)
|
||||
+ mounted ();
|
||||
/* FIXME: multithreading */
|
||||
err = fuse_session_loop(se);
|
||||
fuse_remove_signal_handlers(se);
|
||||
@@ -466,6 +468,8 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
fuse_opt_free_args(&args);
|
||||
+ if (mounted)
|
||||
+ rmdir (mountpoint);
|
||||
free(ll);
|
||||
free(mountpoint);
|
||||
|
||||
Reference in New Issue
Block a user