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 = reiserfstune
|
||||
|
||||
reiserfstune_SOURCES = tune.c tune.h
|
||||
@@ -72,102 +112,113 @@ man_MANS = reiserfstune.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
LDADD = $(top_srcdir)/lib/libmisc.a $(top_srcdir)/reiserfscore/libcore.a
|
||||
subdir = tune
|
||||
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 = reiserfstune$(EXEEXT)
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I../include
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
reiserfstune_OBJECTS = tune.o
|
||||
am_reiserfstune_OBJECTS = tune.$(OBJEXT)
|
||||
reiserfstune_OBJECTS = $(am_reiserfstune_OBJECTS)
|
||||
reiserfstune_LDADD = $(LDADD)
|
||||
reiserfstune_DEPENDENCIES = $(top_srcdir)/lib/libmisc.a \
|
||||
$(top_srcdir)/reiserfscore/libcore.a
|
||||
reiserfstune_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
reiserfstune_DEPENDENCIES = $(top_srcdir)/lib/libmisc.a \
|
||||
$(top_srcdir)/reiserfscore/libcore.a
|
||||
reiserfstune_LDFLAGS =
|
||||
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/tune.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 = $(reiserfstune_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 = $(reiserfstune_SOURCES)
|
||||
OBJECTS = $(reiserfstune_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 tune/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 tune/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)
|
||||
reiserfstune$(EXEEXT): $(reiserfstune_OBJECTS) $(reiserfstune_DEPENDENCIES)
|
||||
@rm -f reiserfstune$(EXEEXT)
|
||||
$(LINK) $(reiserfstune_LDFLAGS) $(reiserfstune_OBJECTS) $(reiserfstune_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)/tune.Po@am__quote@
|
||||
|
||||
reiserfstune: $(reiserfstune_OBJECTS) $(reiserfstune_DEPENDENCIES)
|
||||
@rm -f reiserfstune
|
||||
$(LINK) $(reiserfstune_LDFLAGS) $(reiserfstune_OBJECTS) $(reiserfstune_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; \
|
||||
@@ -176,152 +227,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 = tune
|
||||
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
|
||||
tune.o: tune.c tune.h ../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.
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" Copyright 1996-2002 Hans Reiser.
|
||||
.\" Copyright 1996-2003 Hans Reiser.
|
||||
.\"
|
||||
.TH REISERFSTUNE 8 "January 2002" "Reiserfsprogs-3.6.4"
|
||||
.TH REISERFSTUNE 8 "April 2003" "Reiserfsprogs-3.6.9"
|
||||
.SH NAME
|
||||
reiserfstune
|
||||
.SH SYNOPSIS
|
||||
@@ -9,7 +9,7 @@ reiserfstune
|
||||
[ \fB-f\fR ]
|
||||
[ \fB-j\fR | \fB--journal-device\fR \fIFILE\fR ]
|
||||
[ \fB--no-journal-available\fR ]
|
||||
[ \fB--journal-new-device\fR \fIFILE\fR ]
|
||||
[ \fB--journal-new-device\fR \fIFILE\fR ] [ \fB--make-journal-standard\fR ]
|
||||
[ \fB-s\fR | \fB--journal-new-size\fR \fIN\fR ]
|
||||
[ \fB-o\fR | \fB--journal-new-offset\fR \fIN\fR ]
|
||||
[ \fB-t\fR | \fB--max-transaction-size\fR \fIN\fR ]
|
||||
|
||||
+183
-87
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright 2002 Hans Reiser
|
||||
* Copyright 2002-2003 by Hans Reiser, licensing governed by
|
||||
* reiserfsprogs/README
|
||||
*/
|
||||
|
||||
#include "tune.h"
|
||||
|
||||
char *program_name;
|
||||
@@ -47,6 +49,11 @@ static void print_usage_and_exit(void)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/*
|
||||
Undocumented options:
|
||||
-B badblock_file
|
||||
*/
|
||||
|
||||
unsigned long Journal_size = 0;
|
||||
int Max_trans_size = JOURNAL_TRANS_MAX;
|
||||
int Offset = 0;
|
||||
@@ -54,62 +61,52 @@ __u16 Options = 0;
|
||||
int Force = 0;
|
||||
char * LABEL;
|
||||
unsigned char UUID[16];
|
||||
char * badblocks_file;
|
||||
|
||||
static int should_make_journal_non_standard (int force)
|
||||
{
|
||||
message ("ATTENTION! Filesystem with standard journal found. ");
|
||||
check_forcing_ask_confirmation (force);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If specified paramenters defines the standard journal, make it standard. */
|
||||
static int should_make_journal_standard (reiserfs_filsys_t * fs, char * j_new_dev_name)
|
||||
{
|
||||
if (!is_reiserfs_jr_magic_string (fs->fs_ondisk_sb))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
if (!user_confirmed (stderr, "ATTENTION! Filesystem with non-standard journal "
|
||||
"found. Continue? (y/n):", "y\n")) {
|
||||
exit(1);
|
||||
}
|
||||
*/
|
||||
/* make sure journal is on main device, it has default size
|
||||
and the file system has non-standard magic */
|
||||
|
||||
|
||||
if (j_new_dev_name) {
|
||||
/* new journal was specified - check if it is available */
|
||||
if (strcmp (j_new_dev_name, fs->fs_file_name)) {
|
||||
message ("Can not create standard journal on separated device %s",
|
||||
j_new_dev_name);
|
||||
if (strcmp (j_new_dev_name, fs->fs_file_name))
|
||||
return 0;
|
||||
}
|
||||
if (Journal_size && (Journal_size != journal_default_size (fs->fs_super_bh->b_blocknr, fs->fs_blocksize))) {
|
||||
message ("Can not create standard journal of the size %lu",
|
||||
Journal_size);
|
||||
|
||||
if (Journal_size && Journal_size !=
|
||||
journal_default_size(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1)
|
||||
return 0;
|
||||
}
|
||||
if (Max_trans_size && (Max_trans_size != JOURNAL_TRANS_MAX)) {
|
||||
message ("Can not create standard journal with the transaction "
|
||||
"max size %u", Max_trans_size);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (Max_trans_size && (Max_trans_size != JOURNAL_TRANS_MAX))
|
||||
return 0;
|
||||
} else {
|
||||
/* new journal was not specified - check ondisk journal params */
|
||||
if (get_jp_journal_dev(sb_jp(fs->fs_ondisk_sb))) {
|
||||
message ("Can not create standard journal on separated device [0x%x]",
|
||||
get_jp_journal_dev(sb_jp(fs->fs_ondisk_sb)));
|
||||
return 0;
|
||||
}
|
||||
if(get_jp_journal_size(sb_jp(fs->fs_ondisk_sb))!= journal_default_size (fs->fs_super_bh->b_blocknr, fs->fs_blocksize)){
|
||||
message ("Can not create standard journal of the size %u",
|
||||
get_jp_journal_size(sb_jp(fs->fs_ondisk_sb)));
|
||||
|
||||
if (get_sb_reserved_for_journal(fs->fs_ondisk_sb) <
|
||||
journal_default_size (fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1)
|
||||
{
|
||||
message ("Can not create standard journal of the size %llu",
|
||||
journal_default_size(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int set_standard_journal_params (reiserfs_filsys_t * fs)
|
||||
{
|
||||
struct buffer_head * bh;
|
||||
|
||||
/* ondisk superblock update */
|
||||
|
||||
if (get_sb_version(fs->fs_ondisk_sb) == 0)
|
||||
@@ -123,6 +120,11 @@ static int set_standard_journal_params (reiserfs_filsys_t * fs)
|
||||
" try reiserfsck first", get_sb_version(fs->fs_ondisk_sb));
|
||||
return 0;
|
||||
}
|
||||
|
||||
set_jp_journal_1st_block (sb_jp(fs->fs_ondisk_sb), get_journal_start_must (fs));
|
||||
set_jp_journal_dev (sb_jp(fs->fs_ondisk_sb), 0);
|
||||
set_jp_journal_size (sb_jp(fs->fs_ondisk_sb), journal_default_size(fs->fs_super_bh->b_blocknr, fs->fs_blocksize));
|
||||
|
||||
if (get_jp_journal_max_trans_len(sb_jp(fs->fs_ondisk_sb)) != JOURNAL_TRANS_MAX)
|
||||
set_jp_journal_max_trans_len(sb_jp(fs->fs_ondisk_sb), JOURNAL_TRANS_MAX);
|
||||
if (get_jp_journal_max_batch(sb_jp(fs->fs_ondisk_sb)) != JOURNAL_MAX_BATCH)
|
||||
@@ -134,15 +136,26 @@ static int set_standard_journal_params (reiserfs_filsys_t * fs)
|
||||
set_sb_reserved_for_journal (fs->fs_ondisk_sb, 0);
|
||||
|
||||
/* journal_header update */
|
||||
bh = getblk(fs->fs_journal_dev,
|
||||
get_jp_journal_1st_block(sb_jp(fs->fs_ondisk_sb)) +
|
||||
get_jp_journal_size(sb_jp(fs->fs_ondisk_sb)), fs->fs_blocksize);
|
||||
|
||||
((struct reiserfs_journal_header *)(fs->fs_jh_bh->b_data)) -> jh_journal =
|
||||
*(sb_jp(fs->fs_ondisk_sb));
|
||||
if (!bh) {
|
||||
message ("Cannot get the journal header block. getblk failed.\n");
|
||||
return 0;
|
||||
}
|
||||
((struct reiserfs_journal_header *)(bh->b_data))->jh_journal = *(sb_jp(fs->fs_ondisk_sb));
|
||||
mark_buffer_uptodate (bh, 1);
|
||||
mark_buffer_dirty (bh);
|
||||
bwrite(bh);
|
||||
brelse(bh);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void zero_journal (reiserfs_filsys_t * fs)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
struct buffer_head * bh;
|
||||
unsigned long done;
|
||||
unsigned long start, len;
|
||||
@@ -214,7 +227,11 @@ int main (int argc, char **argv)
|
||||
int Is_journal_or_maxtrans_size_specified = 0;
|
||||
|
||||
program_name = strrchr( argv[ 0 ], '/' );
|
||||
program_name = program_name ? ++ program_name : argv[ 0 ];
|
||||
|
||||
if (program_name)
|
||||
program_name++;
|
||||
else
|
||||
program_name = argv[ 0 ];
|
||||
|
||||
print_banner (program_name);
|
||||
|
||||
@@ -243,7 +260,7 @@ int main (int argc, char **argv)
|
||||
};
|
||||
int option_index;
|
||||
|
||||
c = getopt_long (argc, argv, "j:s:t:o:fu:l:",
|
||||
c = getopt_long (argc, argv, "j:s:t:o:fu:l:B:",
|
||||
options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
@@ -289,6 +306,9 @@ int main (int argc, char **argv)
|
||||
confirmation */
|
||||
Force ++;
|
||||
break;
|
||||
case 'B': /* --badblock-list */
|
||||
asprintf (&badblocks_file, "%s", optarg);
|
||||
break;
|
||||
case 'u':
|
||||
/* UUID */
|
||||
if (!strcmp(optarg, "random")) {
|
||||
@@ -331,50 +351,108 @@ int main (int argc, char **argv)
|
||||
/* device to be formatted */
|
||||
device_name = argv [optind];
|
||||
|
||||
if (!jdevice_name && !(Options & OPT_SKIP_J))
|
||||
jdevice_name = device_name;
|
||||
|
||||
if (jdevice_name && (Options & OPT_SKIP_J)) {
|
||||
message ("either specify journal device, "
|
||||
"or choose the option --no-journal-awailable");
|
||||
return 1;
|
||||
}
|
||||
fs = reiserfs_open (device_name, O_RDONLY, 0, NULL);
|
||||
fs = reiserfs_open (device_name, O_RDONLY, 0, NULL, 1);
|
||||
if (no_reiserfs_found(fs)) {
|
||||
message ("Cannot open reiserfs on %s", device_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* now we try to open journal, it makes sence if there is no the flag
|
||||
NEED_TUNE in ondisk superblock */
|
||||
if (get_jp_journal_magic(sb_jp(fs->fs_ondisk_sb)) != NEED_TUNE) {
|
||||
if (!reiserfs_open_journal (fs, jdevice_name, O_RDONLY)) {
|
||||
if (!(Options & OPT_SKIP_J)) {
|
||||
message ("Unable to open old journal.");
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
if (!reiserfs_is_fs_consistent (fs)) {
|
||||
message ("Check filesystem consistency first");
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
/* forced to continue without journal available/specifed */
|
||||
}
|
||||
}
|
||||
|
||||
/* journal was opened or it wasn't opened but the option
|
||||
--no-journal-available has been specified by user */
|
||||
|
||||
/* make sure filesystem is not mounted */
|
||||
if (is_mounted (fs->fs_file_name)) {
|
||||
/* fixme: it can not be mounted, btw */
|
||||
message ("can not rebuild journal of mounted filesystem");
|
||||
message ("Reiserfstune is not allowed to be run on mounted filesystem.");
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!reiserfs_is_fs_consistent (fs)) {
|
||||
message ("Filesystem looks not cleanly umounted, check the consistency first.\n");
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
reiserfs_reopen (fs, O_RDWR);
|
||||
|
||||
if (badblocks_file) {
|
||||
unsigned long i, marked = 0;
|
||||
|
||||
if (reiserfs_open_ondisk_bitmap (fs) < 0) {
|
||||
message("Failed to open reiserfs ondisk bitmap.\n");
|
||||
reiserfs_close(fs);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (create_badblock_bitmap (fs, badblocks_file)) {
|
||||
message("Failed to initialize the bad block bitmap.\n");
|
||||
reiserfs_close(fs);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (i = 0; i < get_sb_block_count (fs->fs_ondisk_sb); i ++) {
|
||||
if (reiserfs_bitmap_test_bit (fs->fs_badblocks_bm, i)) {
|
||||
if (!reiserfs_bitmap_test_bit (fs->fs_bitmap2, i)) {
|
||||
reiserfs_bitmap_set_bit (fs->fs_bitmap2, i);
|
||||
marked++;
|
||||
} else {
|
||||
/* Check that this is a block */
|
||||
if (not_data_block(fs, i)) {
|
||||
message("Block %lu belongs to the internal reiserfs area "
|
||||
"and cannot be reloacted.\n", i);
|
||||
|
||||
exit(1);
|
||||
} else {
|
||||
message("Block %lu is used already in reiserfs tree.\n", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
message("%lu bad blocks were marked as used.\n", marked);
|
||||
|
||||
reiserfs_close(fs);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!jdevice_name && !(Options & OPT_SKIP_J)) {
|
||||
message ("Journal device has not been specified. Assuming journal is on the main "
|
||||
"device (%s).\n", device_name);
|
||||
jdevice_name = device_name;
|
||||
}
|
||||
|
||||
if (jdevice_name && (Options & OPT_SKIP_J)) {
|
||||
message ("Either specify journal device, "
|
||||
"or choose the option --no-journal-available");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (j_new_device_name && (Options & OPT_STANDARD)) {
|
||||
/* New device was specified and --make-journal-standard was also. */
|
||||
message ("Either specify new journal device, "
|
||||
"or choose the option --make-journal-standard");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* now we try to open journal, it makes sence if there is no the flag
|
||||
NEED_TUNE in ondisk superblock and --no-journal available is not
|
||||
specified. */
|
||||
if (get_jp_journal_magic(sb_jp(fs->fs_ondisk_sb)) != NEED_TUNE &&
|
||||
!(Options & OPT_SKIP_J))
|
||||
{
|
||||
if (reiserfs_open_journal (fs, jdevice_name, O_RDWR | O_LARGEFILE)) {
|
||||
message ("Failed to open the journal device (%s).", jdevice_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (reiserfs_journal_params_check(fs)) {
|
||||
message ("Unable to open old journal. Wrong journal parameters.");
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* in spite of journal was opened, the file system can be non-consistent or
|
||||
there are non-replayed transaction in journal,
|
||||
make sure it isn't (if there is no the flag NEED_TUNE in ondisk superblock */
|
||||
@@ -398,13 +476,12 @@ int main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
reiserfs_reopen (fs, O_RDWR);
|
||||
|
||||
/* set UUID and LABEL if specified */
|
||||
if (fs->fs_format == REISERFS_FORMAT_3_6) {
|
||||
if (uuid_is_correct (UUID)) {
|
||||
memcpy (fs->fs_ondisk_sb->s_uuid, UUID, 16);
|
||||
mark_buffer_dirty (fs->fs_super_bh);
|
||||
fs->fs_dirt = 1;
|
||||
}
|
||||
|
||||
if (LABEL != NULL) {
|
||||
@@ -412,8 +489,8 @@ int main (int argc, char **argv)
|
||||
message ("Specified LABEL is longer then 16 characters, will be truncated\n");
|
||||
strncpy (fs->fs_ondisk_sb->s_label, LABEL, 16);
|
||||
mark_buffer_dirty (fs->fs_super_bh);
|
||||
fs->fs_dirt = 1;
|
||||
}
|
||||
fs->fs_dirt = 1;
|
||||
} else {
|
||||
if (uuid_is_correct (UUID))
|
||||
reiserfs_panic ("UUID cannot be specified for 3.5 format\n");
|
||||
@@ -422,15 +499,22 @@ int main (int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!j_new_device_name) {
|
||||
/* new journal device hasn't been specify */
|
||||
|
||||
/* new journal device hasn't been specified */
|
||||
printf ("Current parameters:\n");
|
||||
print_filesystem_state (stdout, fs);
|
||||
print_block (stdout, fs, fs->fs_super_bh);
|
||||
printf ("Current journal parameters:\n");
|
||||
print_journal_params (stdout, sb_jp (fs->fs_ondisk_sb));
|
||||
|
||||
if ((Options & OPT_STANDARD)
|
||||
&& should_make_journal_standard(fs, j_new_device_name)) {
|
||||
&& should_make_journal_standard(fs, j_new_device_name))
|
||||
{
|
||||
if (!user_confirmed (stderr, "ATTENTION! Filesystem with "
|
||||
"non-standard journal found. Continue? (y/n):", "y\n"))
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fs->fs_journal_dev = fs->fs_dev;
|
||||
if (set_standard_journal_params (fs)) {
|
||||
printf ("\nNew parameters:\n");
|
||||
print_filesystem_state (stdout, fs);
|
||||
@@ -439,8 +523,6 @@ int main (int argc, char **argv)
|
||||
print_journal_params (stdout, sb_jp (fs->fs_ondisk_sb));
|
||||
mark_buffer_dirty (fs->fs_super_bh);
|
||||
mark_buffer_uptodate (fs->fs_super_bh, 1);
|
||||
mark_buffer_dirty (fs->fs_jh_bh);
|
||||
mark_buffer_uptodate (fs->fs_jh_bh, 1);
|
||||
reiserfs_close (fs);
|
||||
printf ("Syncing.."); fflush (stdout);
|
||||
sync ();
|
||||
@@ -448,12 +530,18 @@ int main (int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (Is_journal_or_maxtrans_size_specified)
|
||||
|
||||
if (Is_journal_or_maxtrans_size_specified) {
|
||||
/* new journal device hasn't been specified, but
|
||||
journal size or max transaction size have been, so we suppose
|
||||
that journal device remains the same */
|
||||
if (!reiserfs_journal_opened (fs)) {
|
||||
message("Cannot set up new paramenters for not specified journal.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
j_new_device_name = jdevice_name;
|
||||
else {
|
||||
} else {
|
||||
/* the only parameter has been specified is device_name, so
|
||||
there is nothing to do */
|
||||
reiserfs_close (fs);
|
||||
@@ -479,17 +567,23 @@ int main (int argc, char **argv)
|
||||
else
|
||||
/* non-standard journal */
|
||||
reserved = get_sb_reserved_for_journal (fs->fs_ondisk_sb);
|
||||
|
||||
journal_size = Journal_size;
|
||||
|
||||
journal_size = (Journal_size ? Journal_size : journal_default_size(fs->fs_super_bh->b_blocknr, fs->fs_blocksize));
|
||||
if (!journal_size) {
|
||||
journal_size = journal_default_size(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1;
|
||||
message("Journal size has not been specified. Assuming it is the default size (%lu)",
|
||||
journal_size);
|
||||
}
|
||||
|
||||
/* journal_size = (Journal_size ? Journal_size : // specified
|
||||
(fs->fs_blocksize == 1024 ? (fs->fs_blocksize) * 8 - 3 -
|
||||
REISERFS_DISK_OFFSET_IN_BYTES / fs->fs_blocksize :
|
||||
JOURNAL_DEFAULT_SIZE + 1)); // default
|
||||
*/
|
||||
if (journal_size > reserved) {
|
||||
if (journal_size + Offset > get_journal_start_must (fs) + reserved) {
|
||||
message ("There is no enough space reserved for journal on main "
|
||||
"device (journal_size=%lu, reserved=%lu\n", journal_size,
|
||||
"device (journal_size=%lu, reserved=%lu)\n", journal_size,
|
||||
reserved);
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
@@ -502,11 +596,14 @@ int main (int argc, char **argv)
|
||||
if (!is_reiserfs_jr_magic_string (fs->fs_ondisk_sb)) {
|
||||
/* we have standard journal, so check if we can convert it
|
||||
to non-standard one */
|
||||
|
||||
/*
|
||||
if (!should_make_journal_non_standard (Force)) {
|
||||
reiserfs_close (fs);
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
if (is_reiserfs_3_6_magic_string (fs->fs_ondisk_sb))
|
||||
set_sb_version (fs->fs_ondisk_sb, REISERFS_FORMAT_3_6);
|
||||
else if (is_reiserfs_3_5_magic_string (fs->fs_ondisk_sb))
|
||||
@@ -520,7 +617,7 @@ int main (int argc, char **argv)
|
||||
memcpy (fs->fs_ondisk_sb->s_v1.s_magic, REISERFS_JR_SUPER_MAGIC_STRING,
|
||||
strlen (REISERFS_JR_SUPER_MAGIC_STRING));
|
||||
set_sb_reserved_for_journal (fs->fs_ondisk_sb,
|
||||
get_jp_journal_size (sb_jp(fs->fs_ondisk_sb)) + 1);
|
||||
get_jp_journal_size (sb_jp(fs->fs_ondisk_sb)) + 1);
|
||||
}
|
||||
|
||||
/* now we are going to close old journal and to create a new one */
|
||||
@@ -533,10 +630,9 @@ int main (int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (Options & OPT_STANDARD)
|
||||
if (should_make_journal_standard (fs, j_new_device_name))
|
||||
set_standard_journal_params (fs);
|
||||
|
||||
if (should_make_journal_standard (fs, j_new_device_name))
|
||||
set_standard_journal_params (fs);
|
||||
|
||||
message ("New journal parameters:");
|
||||
print_journal_params (stdout, sb_jp (fs->fs_ondisk_sb));
|
||||
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright 2002 Hans Reiser, licensing governed by ../README
|
||||
* Copyright 2002-2003 by Hans Reiser, licensing governed by
|
||||
* reiserfsprogs/README
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in new issue
Block a user