Imported reiserfsprogs-3.6.9
This commit is contained in:
1 parent
99c89460c3
commit
cccefa4d84
86 files changed
+13393
-6954
No files matched your search
+296
-185
@@ -1,6 +1,8 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||
# Makefile.in generated by automake 1.7.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -10,60 +12,98 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
sbin_PROGRAMS = mkreiserfs
|
||||
|
||||
mkreiserfs_SOURCES = mkreiserfs.c
|
||||
@@ -71,102 +111,113 @@ man_MANS = mkreiserfs.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
LDADD = $(top_srcdir)/lib/libmisc.a $(top_srcdir)/reiserfscore/libcore.a
|
||||
subdir = mkreiserfs
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../include/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
sbin_PROGRAMS = mkreiserfs$(EXEEXT)
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I../include
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
mkreiserfs_OBJECTS = mkreiserfs.o
|
||||
am_mkreiserfs_OBJECTS = mkreiserfs.$(OBJEXT)
|
||||
mkreiserfs_OBJECTS = $(am_mkreiserfs_OBJECTS)
|
||||
mkreiserfs_LDADD = $(LDADD)
|
||||
mkreiserfs_DEPENDENCIES = $(top_srcdir)/lib/libmisc.a \
|
||||
$(top_srcdir)/reiserfscore/libcore.a
|
||||
mkreiserfs_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
mkreiserfs_DEPENDENCIES = $(top_srcdir)/lib/libmisc.a \
|
||||
$(top_srcdir)/reiserfscore/libcore.a
|
||||
mkreiserfs_LDFLAGS =
|
||||
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mkreiserfs.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
man8dir = $(mandir)/man8
|
||||
MANS = $(man_MANS)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(mkreiserfs_SOURCES)
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
MANS = $(man_MANS)
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
SOURCES = $(mkreiserfs_SOURCES)
|
||||
OBJECTS = $(mkreiserfs_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mkreiserfs/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-sbinPROGRAMS:
|
||||
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
|
||||
distclean-sbinPROGRAMS:
|
||||
|
||||
maintainer-clean-sbinPROGRAMS:
|
||||
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu mkreiserfs/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
install-sbinPROGRAMS: $(sbin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir)
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-sbinPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(sbindir)/$$f; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
clean-sbinPROGRAMS:
|
||||
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
|
||||
mkreiserfs$(EXEEXT): $(mkreiserfs_OBJECTS) $(mkreiserfs_DEPENDENCIES)
|
||||
@rm -f mkreiserfs$(EXEEXT)
|
||||
$(LINK) $(mkreiserfs_LDFLAGS) $(mkreiserfs_OBJECTS) $(mkreiserfs_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkreiserfs.Po@am__quote@
|
||||
|
||||
mkreiserfs: $(mkreiserfs_OBJECTS) $(mkreiserfs_DEPENDENCIES)
|
||||
@rm -f mkreiserfs
|
||||
$(LINK) $(mkreiserfs_LDFLAGS) $(mkreiserfs_OBJECTS) $(mkreiserfs_LDADD) $(LIBS)
|
||||
distclean-depend:
|
||||
-rm -rf ./$(DEPDIR)
|
||||
|
||||
install-man8:
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
|
||||
uninstall-info-am:
|
||||
|
||||
man8dir = $(mandir)/man8
|
||||
install-man8: $(man8_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(man8dir)
|
||||
@list='$(man8_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
@@ -175,152 +226,212 @@ install-man8:
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
8*) ;; \
|
||||
*) ext='8' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
|
||||
done
|
||||
|
||||
uninstall-man8:
|
||||
@list='$(man8_MANS)'; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do \
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.8*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
8*) ;; \
|
||||
*) ext='8' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
|
||||
rm -f $(DESTDIR)$(man8dir)/$$inst; \
|
||||
done
|
||||
install-man: $(MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-man8
|
||||
uninstall-man:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-man8
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
mostlyclean-tags:
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
clean-tags:
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = mkreiserfs
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
mkreiserfs.o: mkreiserfs.c ../include/io.h ../include/misc.h \
|
||||
../include/swab.h ../include/reiserfs_lib.h \
|
||||
../include/reiserfs_fs.h ../include/config.h ../version.h
|
||||
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS)
|
||||
|
||||
install-data-am: install-man
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-sbinPROGRAMS uninstall-man
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS)
|
||||
all-redirect: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
|
||||
|
||||
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-sbinPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-sbinPROGRAMS clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-sbinPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-generic clean-am
|
||||
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-sbinPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
distclean-am: clean-am distclean-compile distclean-depend \
|
||||
distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-exec-am: install-sbinPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man8
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS \
|
||||
clean-sbinPROGRAMS maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
|
||||
install-sbinPROGRAMS mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile install-man8 uninstall-man8 \
|
||||
install-man uninstall-man tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man uninstall-sbinPROGRAMS
|
||||
|
||||
uninstall-man: uninstall-man8
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-sbinPROGRAMS ctags distclean distclean-compile \
|
||||
distclean-depend distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-man8 install-sbinPROGRAMS \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||
uninstall-man8 uninstall-sbinPROGRAMS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
+12
-7
@@ -1,7 +1,7 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" Copyright 1996-2002 Hans Reiser.
|
||||
.\" Copyright 1996-2003 Hans Reiser.
|
||||
.\"
|
||||
.TH MKREISERFS 8 "January 2002" "Reiserfsprogs-3.6.4"
|
||||
.TH MKREISERFS 8 "April 2003" "Reiserfsprogs-3.6.9"
|
||||
.SH NAME
|
||||
mkreiserfs \- create a Linux ReiserFS file system
|
||||
.SH SYNOPSIS
|
||||
@@ -12,6 +12,7 @@ mkreiserfs \- create a Linux ReiserFS file system
|
||||
[ \fB-u\fR | \fB--uuid \fIUUID\fR ]
|
||||
[ \fB-l\fR | \fB--label \fILABEL\fR ]
|
||||
[ \fB--format \fIFORMAT\fR ]
|
||||
[ \fB-q\fR | \fB--quiet\fR ]
|
||||
[ \fB-j\fR | \fB--journal-device \fIFILE\fR ]
|
||||
[ \fB-s\fR | \fB--journal-size \fIN\fR ]
|
||||
[ \fB-o\fR | \fB--journal-offset \fIN\fR ]
|
||||
@@ -41,7 +42,7 @@ will be sorted with. Choose one of r5, rupasov, tea. r5 is default
|
||||
.TP
|
||||
\fB--format \fIFORMAT\fR
|
||||
\fIFORMAT\fR specifies a format new filsystem has to be of. Choose one
|
||||
of 3.5 and 3.6. If none is specified mkreiserfs will create format 3.6
|
||||
of 3.5 and 3.6. If none is specified \fBmkreiserfs\fR will create format 3.6
|
||||
if running kernel is 2.4, 3.5 if 2.2 is running, and will refuse
|
||||
creation under other kernels.
|
||||
.TP
|
||||
@@ -50,11 +51,15 @@ Set the universally unique identifier (\fB UUID \fR) of the filesystem to
|
||||
\fIUUID\fR (see also \fBuuidgen(8)\fR). The format of the UUID is a
|
||||
series of hex digits separated by hypthens, like this:
|
||||
"c1b9d5a2-f162-11cf-9ece-0020afc76f16". If the option skipped,
|
||||
mkreiserfs generates a new one.
|
||||
\fBmkreiserfs\fR generates a new one.
|
||||
.TP
|
||||
\fB-l\fR | \fB--label \fILABEL\fR
|
||||
Set the volume label of the filesystem. \fILABEL\fR can be at most 16
|
||||
characters long; if it is longer than 16 characters, mkreiserfs will truncate it.
|
||||
characters long; if it is longer than 16 characters, \fBmkreiserfs\fR will truncate it.
|
||||
.TP
|
||||
\fB-q\fR | \fB--quiet \fR
|
||||
Make \fBmkreiserfs\fR to work quiet without producing any message, progress and question.
|
||||
It is useful if you run \fBmkreiserfs\fR in a script. For use by end users only.
|
||||
.TP
|
||||
\fB-j\fR | \fB--journal-device \fIFILE\fR
|
||||
\fIFILE\fR is name of block device where the file system is to have
|
||||
@@ -79,12 +84,12 @@ than half the size of the journal. If specifed incorrectly, it will be
|
||||
adjusted.
|
||||
.TP
|
||||
\fB-f\fR
|
||||
This forces mkreiserfs to continue even if device is either whole
|
||||
This forces \fBmkreiserfs\fR to continue even if device is either whole
|
||||
disk, or looks mounted or is not a block device. Specified more than
|
||||
once allows to avoid asking for confirmation.
|
||||
.TP
|
||||
\fB-d\fR
|
||||
This makes mkreiserfs to print debugging information during mkreiserfs.
|
||||
This makes \fBmkreiserfs\fR to print debugging information during \fBmkreiserfs\fR.
|
||||
.TP
|
||||
\fB-V\fR
|
||||
This prints version and exits.
|
||||
|
||||
+148
-149
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 1996-2002 Hans Reiser, licensing governed by ../README
|
||||
* Copyright 1996-2003 by Hans Reiser, licensing governed by
|
||||
* reiserfsprogs/README
|
||||
*/
|
||||
|
||||
/* mkreiserfs is very simple. It supports only 4k blocks. It skips
|
||||
@@ -26,7 +27,6 @@
|
||||
#include <errno.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <linux/kdev_t.h>
|
||||
@@ -46,8 +46,7 @@ char *program_name;
|
||||
static void message( const char * fmt, ... )
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
static void message( const char * fmt, ... )
|
||||
{
|
||||
static void message( const char * fmt, ... ) {
|
||||
char *buf;
|
||||
va_list args;
|
||||
|
||||
@@ -64,34 +63,36 @@ static void message( const char * fmt, ... )
|
||||
|
||||
static void print_usage_and_exit(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [options] "
|
||||
" device [block-count]\n"
|
||||
"\n"
|
||||
"Options:\n\n"
|
||||
" -b | --block-size N size of file-system block, in bytes\n"
|
||||
" -j | --journal-device FILE path to separate device to hold journal\n"
|
||||
" -s | --journal-size N size of the journal in blocks\n"
|
||||
" -o | --journal-offset N offset of the journal from the start of\n"
|
||||
" the separate device, in blocks\n"
|
||||
" -t | --transaction-max-size N maximal size of transaction, in blocks\n"
|
||||
" -h | --hash rupasov|tea|r5 hash function to use by default\n"
|
||||
" -u | --uuid UUID store UUID in the superblock\n"
|
||||
" -l | --label LABEL store LABEL in the superblock\n"
|
||||
" --format 3.5|3.6 old 3.5 format or newer 3.6\n"
|
||||
" -f | --force specified once, make mkreiserfs the whole\n"
|
||||
" disk, not block device or mounted partition;\n"
|
||||
" specified twice, do not ask for confirmation\n"
|
||||
" -d | --debug print debugging information during mkreiser\n"
|
||||
" -V print version and exit\n",
|
||||
program_name);
|
||||
exit (1);
|
||||
fprintf(stderr, "Usage: %s [options] "
|
||||
" device [block-count]\n"
|
||||
"\n"
|
||||
"Options:\n\n"
|
||||
" -b | --block-size N size of file-system block, in bytes\n"
|
||||
" -j | --journal-device FILE path to separate device to hold journal\n"
|
||||
" -s | --journal-size N size of the journal in blocks\n"
|
||||
" -o | --journal-offset N offset of the journal from the start of\n"
|
||||
" the separate device, in blocks\n"
|
||||
" -t | --transaction-max-size N maximal size of transaction, in blocks\n"
|
||||
" -h | --hash rupasov|tea|r5 hash function to use by default\n"
|
||||
" -u | --uuid UUID store UUID in the superblock\n"
|
||||
" -l | --label LABEL store LABEL in the superblock\n"
|
||||
" --format 3.5|3.6 old 3.5 format or newer 3.6\n"
|
||||
" -f | --force specified once, make mkreiserfs the whole\n"
|
||||
" disk, not block device or mounted partition;\n"
|
||||
" specified twice, do not ask for confirmation\n"
|
||||
" -q | --quiet quiet work without messages, progress and\n"
|
||||
" questions. Useful if run in a script. For use\n"
|
||||
" by end users only.\n"
|
||||
" -d | --debug print debugging information during mkreiser\n"
|
||||
" -V print version and exit\n",
|
||||
program_name);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
// " -B badblocks-file list of all bad blocks on the fs\n"
|
||||
// " -B badblocks-file list of all bad blocks on the fs\n"
|
||||
|
||||
int Create_default_journal = 1;
|
||||
int Block_size = 4096;
|
||||
int DEBUG_MODE = 0;
|
||||
|
||||
/* size of journal + 1 block for journal header */
|
||||
unsigned long Journal_size = 0;
|
||||
@@ -103,21 +104,28 @@ unsigned char UUID[16];
|
||||
unsigned char * LABEL = NULL;
|
||||
char * badblocks_file;
|
||||
|
||||
enum mkfs_mode {
|
||||
DEBUG_MODE = 1 << 0,
|
||||
QUIET_MODE = 1 << 1
|
||||
};
|
||||
|
||||
int mode;
|
||||
|
||||
/* form super block (old one) */
|
||||
static void make_super_block (reiserfs_filsys_t * fs)
|
||||
{
|
||||
set_sb_umount_state (fs->fs_ondisk_sb, REISERFS_CLEANLY_UMOUNTED);
|
||||
set_sb_umount_state (fs->fs_ondisk_sb, FS_CLEANLY_UMOUNTED);
|
||||
set_sb_tree_height (fs->fs_ondisk_sb, 2);
|
||||
set_sb_hash_code (fs->fs_ondisk_sb, Hash);
|
||||
if (fs->fs_format == REISERFS_FORMAT_3_6) {
|
||||
if (!uuid_is_correct (UUID) && generate_random_uuid (UUID))
|
||||
reiserfs_warning (stdout, "failed to genetate UUID\n");
|
||||
reiserfs_warning (stderr, "failed to genetate UUID\n");
|
||||
|
||||
memcpy (fs->fs_ondisk_sb->s_uuid, UUID, 16);
|
||||
if (LABEL != NULL) {
|
||||
if (strlen (LABEL) > 16)
|
||||
reiserfs_warning (stderr, "\nSpecified LABEL is longer then 16 characters, will be truncated\n\n");
|
||||
reiserfs_warning (stderr, "\nSpecified LABEL is longer then 16 "
|
||||
"characters, will be truncated\n\n");
|
||||
strncpy (fs->fs_ondisk_sb->s_label, LABEL, 16);
|
||||
}
|
||||
set_sb_v2_flag (fs->fs_ondisk_sb, reiserfs_attrs_cleared);
|
||||
@@ -157,20 +165,18 @@ static void invalidate_other_formats (int dev)
|
||||
|
||||
void zero_journal (reiserfs_filsys_t * fs)
|
||||
{
|
||||
int i;
|
||||
unsigned long start, len, done;
|
||||
struct buffer_head * bh;
|
||||
unsigned long done;
|
||||
unsigned long start, len;
|
||||
unsigned int i;
|
||||
|
||||
|
||||
fprintf (stderr, "Initializing journal - ");
|
||||
fprintf (stdout, "Initializing journal - ");
|
||||
|
||||
start = get_jp_journal_1st_block (sb_jp (fs->fs_ondisk_sb));
|
||||
len = get_jp_journal_size (sb_jp (fs->fs_ondisk_sb));
|
||||
|
||||
done = 0;
|
||||
for (i = 0; i < len; i ++) {
|
||||
print_how_far (stderr, &done, len, 1, 1/*be quiet*/);
|
||||
print_how_far (stdout, &done, len, 1, 1/*be quiet*/);
|
||||
bh = getblk (fs->fs_journal_dev, start + i, fs->fs_blocksize);
|
||||
if (!bh)
|
||||
die ("zero_journal: getblk failed");
|
||||
@@ -181,8 +187,8 @@ void zero_journal (reiserfs_filsys_t * fs)
|
||||
brelse (bh);
|
||||
}
|
||||
|
||||
fprintf (stderr, "\n");
|
||||
fflush (stderr);
|
||||
fprintf (stdout, "\n");
|
||||
fflush (stdout);
|
||||
}
|
||||
|
||||
|
||||
@@ -191,20 +197,18 @@ void zero_journal (reiserfs_filsys_t * fs)
|
||||
static void make_bitmap (reiserfs_filsys_t * fs)
|
||||
{
|
||||
struct reiserfs_super_block * sb = fs->fs_ondisk_sb;
|
||||
int i;
|
||||
unsigned int i;
|
||||
unsigned long block;
|
||||
int marked;
|
||||
|
||||
|
||||
marked = 0;
|
||||
|
||||
/* mark skipped area and super block */
|
||||
for (i = 0; i <= fs->fs_super_bh->b_blocknr; i ++) {
|
||||
reiserfs_bitmap_set_bit (fs->fs_bitmap2, i);
|
||||
marked ++;
|
||||
reiserfs_bitmap_set_bit (fs->fs_bitmap2, i);
|
||||
marked ++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (fs->fs_badblocks_bm) {
|
||||
for (i = 0; i < get_sb_block_count (sb); i ++) {
|
||||
if (reiserfs_bitmap_test_bit (fs->fs_badblocks_bm, i)) {
|
||||
@@ -221,7 +225,8 @@ static void make_bitmap (reiserfs_filsys_t * fs)
|
||||
reiserfs_bitmap_set_bit (fs->fs_bitmap2, block);
|
||||
marked ++;
|
||||
if (spread_bitmaps (fs))
|
||||
block = (block / (fs->fs_blocksize * 8) + 1) * (fs->fs_blocksize * 8);
|
||||
block = (block / (fs->fs_blocksize * 8) + 1) *
|
||||
(fs->fs_blocksize * 8);
|
||||
else
|
||||
block ++;
|
||||
}
|
||||
@@ -233,7 +238,7 @@ static void make_bitmap (reiserfs_filsys_t * fs)
|
||||
/* makr journal blocks as used */
|
||||
for (i = 0; i <= get_jp_journal_size (sb_jp (sb)); i ++) {
|
||||
reiserfs_bitmap_set_bit (fs->fs_bitmap2,
|
||||
i + get_jp_journal_1st_block (sb_jp (sb)));
|
||||
i + get_jp_journal_1st_block (sb_jp (sb)));
|
||||
marked ++;
|
||||
}
|
||||
block = get_jp_journal_1st_block (sb_jp (sb)) + i;
|
||||
@@ -244,7 +249,9 @@ static void make_bitmap (reiserfs_filsys_t * fs)
|
||||
block++;
|
||||
}
|
||||
|
||||
while ((block < get_sb_block_count (sb)) && reiserfs_bitmap_test_bit (fs->fs_bitmap2, block)) {
|
||||
while ((block < get_sb_block_count (sb)) &&
|
||||
reiserfs_bitmap_test_bit (fs->fs_bitmap2, block))
|
||||
{
|
||||
block++;
|
||||
}
|
||||
|
||||
@@ -300,7 +307,9 @@ static void make_root_block (reiserfs_filsys_t * fs)
|
||||
static void report (reiserfs_filsys_t * fs, char * j_filename)
|
||||
{
|
||||
// print_block (stdout, fs, fs->fs_super_bh);
|
||||
struct reiserfs_super_block * sb = (struct reiserfs_super_block *)(fs->fs_super_bh->b_data);
|
||||
struct reiserfs_super_block * sb =
|
||||
(struct reiserfs_super_block *)(fs->fs_super_bh->b_data);
|
||||
|
||||
struct stat st;
|
||||
dev_t rdev;
|
||||
|
||||
@@ -308,12 +317,12 @@ static void report (reiserfs_filsys_t * fs, char * j_filename)
|
||||
return;
|
||||
|
||||
if (fstat (fs->fs_super_bh->b_dev, &st) == -1) {
|
||||
/*reiserfs_warning (stderr, "fstat failed: %m\n");*/
|
||||
/*reiserfs_warning (stderr, "fstat failed: %s\n", strerror(errno));*/
|
||||
rdev = 0;
|
||||
} else
|
||||
rdev = st.st_rdev;
|
||||
|
||||
if (DEBUG_MODE) {
|
||||
if (mode & DEBUG_MODE) {
|
||||
reiserfs_warning (stdout, "Block %lu (0x%x) contains super block. ",
|
||||
fs->fs_super_bh->b_blocknr, rdev);
|
||||
}
|
||||
@@ -328,44 +337,48 @@ static void report (reiserfs_filsys_t * fs, char * j_filename)
|
||||
if (is_reiserfs_jr_magic_string (sb))
|
||||
reiserfs_warning (stdout, "non-");
|
||||
reiserfs_warning (stdout, "standard journal\n");
|
||||
reiserfs_warning (stdout, "Count of blocks on the device: %u\n", get_sb_block_count (sb));
|
||||
reiserfs_warning (stdout, "Number of blocks consumed by mkreiserfs formatting process: %u\n",
|
||||
get_sb_block_count (sb) - get_sb_free_blocks (sb));
|
||||
if (DEBUG_MODE)
|
||||
reiserfs_warning (stdout, "Count of blocks on the device: %u\n",
|
||||
get_sb_block_count (sb));
|
||||
reiserfs_warning (stdout, "Number of blocks consumed by mkreiserfs "
|
||||
"formatting process: %u\n", get_sb_block_count (sb) - get_sb_free_blocks (sb));
|
||||
if (mode & DEBUG_MODE)
|
||||
reiserfs_warning (stdout, "Free blocks: %u\n", get_sb_free_blocks (sb));
|
||||
reiserfs_warning (stdout, "Blocksize: %d\n", get_sb_block_size (sb));
|
||||
reiserfs_warning (stdout, "Hash function used to sort names: %s\n",
|
||||
code2name (get_sb_hash_code (sb)));
|
||||
if (DEBUG_MODE) {
|
||||
if (mode & DEBUG_MODE) {
|
||||
reiserfs_warning (stdout, "Number of bitmaps: %u\n", get_sb_bmap_nr (sb));
|
||||
reiserfs_warning (stdout, "Root block: %u\n", get_sb_root_block (sb));
|
||||
reiserfs_warning (stdout, "Tree height: %d\n", get_sb_tree_height (sb));
|
||||
reiserfs_warning (stdout, "Objectid map size %d, max %d\n", get_sb_oid_cursize (sb),
|
||||
get_sb_oid_maxsize (sb));
|
||||
reiserfs_warning (stdout, "Objectid map size %d, max %d\n",
|
||||
get_sb_oid_cursize (sb), get_sb_oid_maxsize (sb));
|
||||
reiserfs_warning (stdout, "Journal parameters:\n");
|
||||
print_journal_params (stdout, sb_jp (sb));
|
||||
} else {
|
||||
if (j_filename && strcmp (j_filename, fs->fs_file_name))
|
||||
reiserfs_warning (stdout, "Journal Device [0x%x]\n", get_jp_journal_dev (sb_jp (sb)));
|
||||
reiserfs_warning (stdout, "Journal Device [0x%x]\n",
|
||||
get_jp_journal_dev (sb_jp (sb)));
|
||||
|
||||
reiserfs_warning (stdout, "Journal Size %u blocks (first block %u)\n",
|
||||
get_jp_journal_size (sb_jp (sb)) + 1,
|
||||
get_jp_journal_1st_block (sb_jp (sb)));
|
||||
get_jp_journal_size (sb_jp (sb)) + 1,
|
||||
get_jp_journal_1st_block (sb_jp (sb)));
|
||||
reiserfs_warning (stdout, "Journal Max transaction length %u\n",
|
||||
get_jp_journal_max_trans_len (sb_jp (sb)));
|
||||
get_jp_journal_max_trans_len (sb_jp (sb)));
|
||||
}
|
||||
|
||||
if (j_filename && strcmp (j_filename, fs->fs_file_name)) {
|
||||
reiserfs_warning (stdout, "Space on this device reserved by journal: %u\n",
|
||||
get_sb_reserved_for_journal (sb));
|
||||
get_sb_reserved_for_journal (sb));
|
||||
}
|
||||
|
||||
if (DEBUG_MODE) {
|
||||
reiserfs_warning (stdout, "Filesystem state 0x%x\n", get_sb_fs_state (sb));
|
||||
reiserfs_warning (stdout, "sb_version %u\n", get_sb_version (sb));
|
||||
if (mode & DEBUG_MODE) {
|
||||
reiserfs_warning (stdout, "Filesystem state 0x%x\n", get_sb_fs_state (sb));
|
||||
reiserfs_warning (stdout, "sb_version %u\n", get_sb_version (sb));
|
||||
}
|
||||
|
||||
if (get_reiserfs_format (sb) == REISERFS_FORMAT_3_6) {
|
||||
reiserfs_warning (stdout, "inode generation number: %u\n", get_sb_v2_inode_generation (sb));
|
||||
reiserfs_warning (stdout, "inode generation number: %u\n",
|
||||
get_sb_v2_inode_generation (sb));
|
||||
reiserfs_warning (stdout, "UUID: %U\n", sb->s_uuid);
|
||||
if (strcmp (sb->s_label, ""))
|
||||
reiserfs_warning (stdout, "LABEL: %s\n", sb->s_label);
|
||||
@@ -393,11 +406,11 @@ static void set_hash_function (char * str)
|
||||
static void set_reiserfs_version (char * str)
|
||||
{
|
||||
if (!strcmp (str, "3.5"))
|
||||
Format = "3.5";
|
||||
Format = "3.5";
|
||||
else {
|
||||
Format = "3.6";
|
||||
if (strcmp (str, "3.6"))
|
||||
message("wrong reiserfs version specified. Using default 3.6 format");
|
||||
Format = "3.6";
|
||||
if (strcmp (str, "3.6"))
|
||||
message("wrong reiserfs version specified. Using default 3.6 format");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,7 +421,7 @@ static int str2int (char * str)
|
||||
|
||||
val = (int) strtol (str, &tmp, 0);
|
||||
if (*tmp)
|
||||
die ("%s: strtol is unable to make an integer of %s\n", program_name, str);
|
||||
die ("%s: strtol is unable to make an integer of %s\n", program_name, str);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -418,8 +431,8 @@ static void set_block_size (char * str, int *b_size)
|
||||
*b_size = str2int (str);
|
||||
|
||||
if (!is_blocksize_correct (*b_size))
|
||||
die ("%s: wrong blocksize %s specified, only divisible by 1024 are supported currently",
|
||||
program_name, str);
|
||||
die ("%s: wrong blocksize %s specified, only power of 2 from 512-8192 "
|
||||
"interval are supported", program_name, str);
|
||||
}
|
||||
|
||||
|
||||
@@ -451,15 +464,18 @@ static void set_offset_in_journal_device (char * str)
|
||||
|
||||
static int is_journal_default (char * name, char * jname, int blocksize)
|
||||
{
|
||||
if (jname && strcmp (name, jname))
|
||||
return 0;
|
||||
if (Journal_size &&
|
||||
Journal_size != journal_default_size (REISERFS_DISK_OFFSET_IN_BYTES / blocksize, blocksize) + 1)
|
||||
/* journal size is set and it is not default size */
|
||||
return 0;
|
||||
if (Max_trans_size != JOURNAL_TRANS_MAX)
|
||||
return 0;
|
||||
return 1;
|
||||
if (jname && strcmp (name, jname))
|
||||
return 0;
|
||||
|
||||
if (Journal_size && Journal_size !=
|
||||
journal_default_size(REISERFS_DISK_OFFSET_IN_BYTES / blocksize, blocksize) + 1)
|
||||
/* journal size is set and it is not default size */
|
||||
return 0;
|
||||
|
||||
if (Max_trans_size && Max_trans_size != JOURNAL_TRANS_MAX)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -482,14 +498,17 @@ static int select_format (void)
|
||||
return REISERFS_FORMAT_3_6;
|
||||
}
|
||||
|
||||
message ("Guessing about desired format.. ");
|
||||
reiserfs_warning (stdout, "Guessing about desired format.. ");
|
||||
|
||||
if (uname (&sysinfo) == -1) {
|
||||
message ("could not get system info: %m");
|
||||
message ("could not get system info: %s", strerror(errno));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
message ("Kernel %s is running.", sysinfo.release);
|
||||
reiserfs_warning(stdout, "Kernel %s is running.\n", sysinfo.release);
|
||||
if (!strncmp (sysinfo.release, "2.6", 3))
|
||||
return REISERFS_FORMAT_3_6;
|
||||
|
||||
if (!strncmp (sysinfo.release, "2.5", 3))
|
||||
return REISERFS_FORMAT_3_6;
|
||||
|
||||
@@ -497,12 +516,12 @@ static int select_format (void)
|
||||
return REISERFS_FORMAT_3_6;
|
||||
|
||||
if (strncmp (sysinfo.release, "2.2", 3)) {
|
||||
message( "You should run either 2.4 or 2.2 to be able "
|
||||
"to create reiserfs filesystem or specify desired format with -v");
|
||||
message( "You should run either 2.2 or 2.4 or higher to be able "
|
||||
"to create reiserfs filesystem or specify desired format with --format");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
message ("Creating filesystem of format 3.5");
|
||||
reiserfs_warning(stdout, "Creating filesystem of format 3.5\n");
|
||||
return REISERFS_FORMAT_3_5;
|
||||
}
|
||||
|
||||
@@ -510,28 +529,27 @@ static int select_format (void)
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
reiserfs_filsys_t * fs;
|
||||
int force;
|
||||
char * device_name;
|
||||
char * jdevice_name;
|
||||
unsigned long fs_size;
|
||||
int force = 0;
|
||||
char * device_name = NULL;
|
||||
char * jdevice_name = NULL;
|
||||
unsigned long fs_size = 0;
|
||||
int c;
|
||||
static int flag;
|
||||
|
||||
|
||||
program_name = strrchr( argv[ 0 ], '/' );
|
||||
program_name = program_name ? ++ program_name : argv[ 0 ];
|
||||
|
||||
print_banner (program_name);
|
||||
|
||||
if (argc < 2)
|
||||
print_usage_and_exit ();
|
||||
if (program_name)
|
||||
program_name++;
|
||||
else
|
||||
program_name = argv[ 0 ];
|
||||
|
||||
force = 0;
|
||||
fs_size = 0;
|
||||
device_name = 0;
|
||||
jdevice_name = 0;
|
||||
|
||||
if (argc < 2) {
|
||||
print_banner (program_name);
|
||||
|
||||
print_usage_and_exit ();
|
||||
}
|
||||
|
||||
while (1) {
|
||||
static struct option options[] = {
|
||||
{"block-size", required_argument, 0, 'b'},
|
||||
@@ -547,7 +565,7 @@ int main (int argc, char **argv)
|
||||
};
|
||||
int option_index;
|
||||
|
||||
c = getopt_long (argc, argv, "b:j:s:t:o:h:u:l:Vfd",
|
||||
c = getopt_long (argc, argv, "b:j:s:t:o:h:u:l:VfdB:q",
|
||||
options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
@@ -596,19 +614,19 @@ int main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
exit (1);
|
||||
print_usage_and_exit ();
|
||||
|
||||
case 'f':
|
||||
force ++;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
DEBUG_MODE = 1;
|
||||
mode |= DEBUG_MODE;
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
if (set_uuid (optarg, UUID)) {
|
||||
reiserfs_warning(stdout, "wrong UUID specified\n");
|
||||
reiserfs_warning(stderr, "wrong UUID specified\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -617,7 +635,10 @@ int main (int argc, char **argv)
|
||||
case 'l':
|
||||
LABEL = optarg;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
mode |= QUIET_MODE;
|
||||
fclose(stdout);
|
||||
break;
|
||||
default:
|
||||
print_usage_and_exit();
|
||||
}
|
||||
@@ -640,28 +661,23 @@ int main (int argc, char **argv)
|
||||
if (is_journal_default (device_name, jdevice_name, Block_size))
|
||||
Create_default_journal = 1;
|
||||
|
||||
if (!Max_trans_size) {
|
||||
/* max transaction size has not been specified,
|
||||
for blocksize >= 4096 - max transaction size is 1024. For block size < 4096
|
||||
- trans max size is decreased proportionally */
|
||||
Max_trans_size = JOURNAL_TRANS_MAX;
|
||||
if (Block_size < 4096)
|
||||
Max_trans_size = JOURNAL_TRANS_MAX / (4096 / Block_size);
|
||||
}
|
||||
|
||||
if (!can_we_format_it (device_name, force))
|
||||
if (!(mode & QUIET_MODE) && !can_we_format_it (device_name, force))
|
||||
return 1;
|
||||
|
||||
if (jdevice_name)
|
||||
if (!can_we_format_it (jdevice_name, force))
|
||||
if (!(mode & QUIET_MODE) && !can_we_format_it (jdevice_name, force))
|
||||
return 1;
|
||||
|
||||
fs = reiserfs_create (device_name, select_format (), fs_size, Block_size, Create_default_journal, 1);
|
||||
fs = reiserfs_create (device_name, select_format(), fs_size, Block_size,
|
||||
Create_default_journal, 1);
|
||||
|
||||
if (!fs) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!reiserfs_create_journal (fs, jdevice_name, Offset, Journal_size, Max_trans_size)) {
|
||||
if (!reiserfs_create_journal (fs, jdevice_name, Offset, Journal_size,
|
||||
Max_trans_size))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -672,7 +688,7 @@ int main (int argc, char **argv)
|
||||
/* these fill buffers (super block, first bitmap, root block) with
|
||||
reiserfs structures */
|
||||
if (uuid_is_correct (UUID) && fs->fs_format != REISERFS_FORMAT_3_6) {
|
||||
reiserfs_warning(stdout, "UUID can be specified only with 3.6 format\n");
|
||||
reiserfs_warning(stderr, "UUID can be specified only with 3.6 format\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -683,11 +699,11 @@ int main (int argc, char **argv)
|
||||
make_super_block (fs);
|
||||
make_bitmap (fs);
|
||||
make_root_block (fs);
|
||||
add_badblock_list (fs, 1);
|
||||
// add_badblock_list (fs, 1);
|
||||
|
||||
report (fs, jdevice_name);
|
||||
|
||||
if (!force) {
|
||||
if (!force && !(mode & QUIET_MODE)) {
|
||||
fprintf (stderr, "ATTENTION: YOU SHOULD REBOOT AFTER FDISK!\n"
|
||||
"\tALL DATA WILL BE LOST ON '%s'", device_name);
|
||||
if (jdevice_name && strcmp (jdevice_name, device_name))
|
||||
@@ -709,32 +725,15 @@ int main (int argc, char **argv)
|
||||
sync ();
|
||||
printf ("ok\n");
|
||||
|
||||
if (DEBUG_MODE)
|
||||
return 0;
|
||||
printf ("\nThe Defense Advanced Research Projects Agency (DARPA) is the primary sponsor of"
|
||||
"\nReiser4. DARPA does not endorse this project; it merely sponsors it."
|
||||
"\n"
|
||||
"\nContinuing core development of version 3 is mostly paid for by Hans Reiser from"
|
||||
"\nmoney made selling licenses in addition to the GPL to companies who don't want"
|
||||
"\nit known that they use ReiserFS as a foundation for their proprietary product."
|
||||
"\nAnd my lawyer asked 'People pay you money for this?'. Yup. Hee Hee. Life is"
|
||||
"\ngood. If you buy ReiserFS, you can focus on your value add rather than"
|
||||
"\nreinventing an entire FS. You should buy some free software too...."
|
||||
"\n"
|
||||
"\nSuSE pays for continuing work on journaling for version 3, and paid for much of"
|
||||
"\nthe previous version 3 work. Reiserfs integration in their distro is"
|
||||
"\nconsistently solid."
|
||||
"\n"
|
||||
"\nMP3.com paid for initial journaling development."
|
||||
"\n"
|
||||
"\nBigstorage.com contributes to our general fund every month, and has done so for"
|
||||
"\nquite a long time."
|
||||
"\n"
|
||||
"\nThanks to all of those sponsors, including the secret ones. Without you, Hans"
|
||||
"\nwould still have that day job, and the merry band of hackers would be missing"
|
||||
"\nquite a few...."
|
||||
"\n"
|
||||
"\nHave fun.\n");
|
||||
if (mode & DEBUG_MODE)
|
||||
return 0;
|
||||
|
||||
misc_print_credit(stdout);
|
||||
printf("\nTell your friends to use the kernel based on 2.4.18 or later "
|
||||
"when you use\nreiserFS. Have fun.\n\n");
|
||||
|
||||
printf("ReiserFS is successfully created on %s.\n", device_name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user