pax_global_header00006660000000000000000000000064120056526410014513gustar00rootroot0000000000000052 comment=a7b17b9a06a53d2c1d39f7949c17c49573742a37 partclone-0.2.51/000077500000000000000000000000001200565264100135675ustar00rootroot00000000000000partclone-0.2.51/.gitattributes000066400000000000000000000000331200565264100164560ustar00rootroot00000000000000src/version.h export-subst partclone-0.2.51/.gitignore000066400000000000000000000000001200565264100155450ustar00rootroot00000000000000partclone-0.2.51/ABOUT-NLS000066400000000000000000002333401200565264100150230ustar00rootroot000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of October 2006. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo +----------------------------------------------------+ GNUnet | [] | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] [] | bash | [] [] [] | batchelor | [] | bfd | | bibshelf | [] | binutils | [] | bison | [] [] | bison-runtime | | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | [] [] | coreutils | [] [] [] | cpio | | cpplib | [] [] [] | cryptonit | [] | darkstat | [] () [] | dialog | [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | error | [] [] [] [] | fetchmail | [] [] () [] | fileutils | [] [] | findutils | [] [] [] | flex | [] [] [] | fslint | [] | gas | | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] | gimp-print | [] [] [] [] | gip | [] | gliv | [] | glunarclock | [] | gmult | [] [] | gnubiff | () | gnucash | () () [] | gnucash-glossary | [] () | gnuedu | | gnulib | [] [] [] [] [] [] | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-filemanager | | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-package | | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | () () | gramadoir | [] [] | grep | [] [] [] [] [] [] | gretl | | gsasl | | gss | | gst-plugins | [] [] [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | () | gtkam | [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] | id-utils | [] [] | impost | | indent | [] [] [] | iso_3166 | [] [] | iso_3166_2 | | iso_4217 | [] | iso_639 | [] [] | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | keytouch | | keytouch-editor | | keytouch-keyboa... | | latrine | () | ld | [] | leafpad | [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] | libgpg-error | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | | libiconv | [] [] | libidn | [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] | make | [] [] | man-db | [] () [] [] | minicom | [] [] [] | mysecretdiary | [] [] | nano | [] [] [] | nano_1_0 | [] () [] [] | opcodes | [] | parted | | pilot-qof | [] | psmisc | [] | pwdutils | | python | | qof | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] | sh-utils | [] [] | shared-mime-info | [] [] [] [] | sharutils | [] [] [] [] [] [] | shishi | | silky | | skencil | [] () | sketch | [] () | solfege | | soundtracker | [] [] | sp | [] | stardict | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] | texinfo | [] [] [] | textutils | [] [] [] | tin | () () | tp-robot | [] | tuxpaint | [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] | xchat | [] [] [] [] [] [] | xkeyboard-config | | xpad | [] [] | +----------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB eo 10 0 1 2 9 22 1 42 41 2 60 95 16 1 17 16 es et eu fa fi fr ga gl gu he hi hr hu id is it +--------------------------------------------------+ GNUnet | | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] [] | aspell | [] [] [] | bash | [] [] [] | batchelor | [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cpplib | [] [] | cryptonit | [] | darkstat | [] () [] [] [] | dialog | [] [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] | error | [] [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gip | [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | () () () | gnucash-glossary | [] [] | gnuedu | [] | gnulib | [] [] [] [] [] [] [] [] | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] [] [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] [] [] | gpe-filemanager | [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | () () [] () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] [] | gsasl | [] [] | gss | [] | gst-plugins | [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] [] | gstreamer | [] [] [] | gtick | [] | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] [] | impost | [] [] | indent | [] [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] [] | iso_639 | [] [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | [] [] [] | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] [] [] | libgpg-error | | libgphoto2 | [] [] [] | libgphoto2_port | [] [] | libgsasl | [] [] | libiconv | [] [] | libidn | [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] [] | lynx | [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | () | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] [] [] [] [] [] | nano_1_0 | [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] [] | pilot-qof | | psmisc | [] [] [] | pwdutils | | python | | qof | [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | shishi | | silky | [] | skencil | [] [] | sketch | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | stardict | [] | system-tools-ba... | [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] | textutils | [] [] [] [] [] | tin | [] () | tp-robot | [] [] [] [] | tuxpaint | [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] [] | vorbis-tools | [] [] | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ es et eu fa fi fr ga gl gu he hi hr hu id is it 88 22 14 2 40 115 61 14 1 8 1 6 59 31 0 52 ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no +-------------------------------------------------+ GNUnet | | a2ps | () [] [] () | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | [] | aspell | [] [] | bash | [] | batchelor | [] [] | bfd | | bibshelf | [] | binutils | | bison | [] [] [] | bison-runtime | [] [] [] | bluez-pin | [] [] [] | cflow | | clisp | [] | console-tools | | coreutils | [] | cpio | | cpplib | [] | cryptonit | [] | darkstat | [] [] | dialog | [] [] | diffutils | [] [] [] | doodle | | e2fsprogs | [] | enscript | [] | error | [] | fetchmail | [] [] | fileutils | [] [] | findutils | [] | flex | [] [] | fslint | [] [] | gas | | gawk | [] [] | gbiff | [] | gcal | | gcc | | gettext-examples | [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gimp-print | [] [] | gip | [] [] | gliv | [] | glunarclock | [] [] | gmult | [] [] | gnubiff | | gnucash | () () | gnucash-glossary | [] | gnuedu | | gnulib | [] [] [] [] | gnunet-gtk | | gnutls | | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] [] [] | gpe-conf | [] [] | gpe-contacts | [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] | gphoto2 | [] [] | gprof | | gpsdrive | () () () | gramadoir | () | grep | [] [] [] [] | gretl | | gsasl | [] | gss | | gst-plugins | [] | gst-plugins-base | | gst-plugins-good | [] | gstreamer | [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] | gutenprint | | hello | [] [] [] [] [] [] | id-utils | [] | impost | | indent | [] [] | iso_3166 | [] | iso_3166_2 | [] | iso_4217 | [] [] [] | iso_639 | [] [] | jpilot | () () () | jtag | | jwhois | [] | kbd | [] | keytouch | [] | keytouch-editor | | keytouch-keyboa... | | latrine | [] | ld | | leafpad | [] [] | libc | [] [] [] [] [] | libexif | | libextractor | | libgpewidget | [] | libgpg-error | | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | | libidn | [] [] | lifelines | [] | lilypond | | lingoteach | [] | lynx | [] [] | m4 | [] [] | mailutils | | make | [] [] [] | man-db | () | minicom | [] | mysecretdiary | [] | nano | [] [] [] | nano_1_0 | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | psmisc | [] [] [] | pwdutils | | python | | qof | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] [] | sed | [] [] | sh-utils | [] [] | shared-mime-info | [] [] [] [] [] | sharutils | [] [] | shishi | | silky | [] | skencil | | sketch | | solfege | | soundtracker | | sp | () | stardict | [] [] | system-tools-ba... | [] [] [] [] | tar | [] [] [] | texinfo | [] [] [] | textutils | [] [] [] | tin | | tp-robot | [] | tuxpaint | [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | vorbis-tools | [] | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] | xpad | [] [] [] | +-------------------------------------------------+ ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no 52 24 2 2 1 3 0 2 3 21 0 15 1 97 5 1 nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +------------------------------------------------------+ GNUnet | | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] | bash | [] [] [] | batchelor | [] [] | bfd | | bibshelf | [] | binutils | [] [] | bison | [] [] [] [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] [] | cflow | [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cpplib | [] | cryptonit | [] [] | darkstat | [] [] [] [] [] [] | dialog | [] [] [] [] [] [] [] [] [] | diffutils | [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | error | [] [] [] [] | fetchmail | [] [] [] | fileutils | [] [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] [] [] [] | gas | | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gimp-print | [] [] | gip | [] [] [] [] | gliv | [] [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () | gnucash | () [] | gnucash-glossary | [] [] [] | gnuedu | | gnulib | [] [] [] [] [] | gnunet-gtk | [] | gnutls | [] [] | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] [] [] [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] | gretl | [] | gsasl | [] [] [] | gss | [] [] [] | gst-plugins | [] [] [] [] | gst-plugins-base | [] | gst-plugins-good | [] [] [] [] | gstreamer | [] [] [] | gtick | [] | gtkam | [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | impost | [] | indent | [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] [] | iso_639 | [] [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | [] [] | ld | [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] [] | libgpewidget | [] [] [] [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] | libidn | [] [] () | lifelines | [] [] | lilypond | | lingoteach | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] [] | make | [] [] [] [] | man-db | [] [] | minicom | [] [] [] [] [] | mysecretdiary | [] [] [] [] | nano | [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] [] | parted | [] | pilot-qof | [] | psmisc | [] [] | pwdutils | [] [] | python | | qof | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | silky | [] | skencil | [] [] [] | sketch | [] [] [] | solfege | [] | soundtracker | [] [] | sp | | stardict | [] [] [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] | tin | () | tp-robot | [] | tuxpaint | [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | vorbis-tools | [] [] | wastesedge | | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] | xpad | [] [] [] | +------------------------------------------------------+ nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 0 2 3 58 30 54 5 73 72 4 40 46 11 50 128 2 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu +---------------------------------------------------+ GNUnet | [] | 2 a2ps | [] [] [] | 19 aegis | | 0 ant-phone | [] [] | 6 anubis | [] [] [] | 11 ap-utils | () [] | 4 aspell | [] [] [] | 15 bash | [] | 11 batchelor | [] [] | 9 bfd | | 1 bibshelf | [] | 7 binutils | [] [] [] | 9 bison | [] [] [] | 19 bison-runtime | [] [] [] | 15 bluez-pin | [] [] [] [] [] [] | 28 cflow | [] [] | 5 clisp | | 6 console-tools | [] [] | 5 coreutils | [] [] | 16 cpio | [] [] [] | 9 cpplib | [] [] [] [] | 11 cryptonit | | 5 darkstat | [] () () | 15 dialog | [] [] [] [] [] | 30 diffutils | [] [] [] [] | 28 doodle | [] | 6 e2fsprogs | [] [] | 10 enscript | [] [] [] | 16 error | [] [] [] [] | 18 fetchmail | [] [] | 12 fileutils | [] [] [] | 18 findutils | [] [] [] | 17 flex | [] [] | 15 fslint | [] | 9 gas | [] | 3 gawk | [] [] | 15 gbiff | [] | 5 gcal | [] | 5 gcc | [] [] [] | 6 gettext-examples | [] [] [] [] [] [] | 27 gettext-runtime | [] [] [] [] [] [] | 28 gettext-tools | [] [] [] [] [] | 19 gimp-print | [] [] | 12 gip | [] [] | 12 gliv | [] [] | 8 glunarclock | [] [] [] | 15 gmult | [] [] [] [] | 15 gnubiff | [] | 1 gnucash | () | 2 gnucash-glossary | [] [] | 9 gnuedu | [] | 2 gnulib | [] [] [] [] [] | 28 gnunet-gtk | | 1 gnutls | | 2 gpe-aerial | [] [] | 14 gpe-beam | [] [] | 14 gpe-calendar | [] | 3 gpe-clock | [] [] [] [] | 21 gpe-conf | [] [] | 14 gpe-contacts | [] [] | 10 gpe-edit | [] [] [] [] | 20 gpe-filemanager | [] | 6 gpe-go | [] [] | 15 gpe-login | [] [] [] [] [] | 21 gpe-ownerinfo | [] [] [] [] | 21 gpe-package | [] | 6 gpe-sketchbook | [] [] | 16 gpe-su | [] [] [] | 20 gpe-taskmanager | [] [] [] | 20 gpe-timesheet | [] [] [] [] | 18 gpe-today | [] [] [] [] [] | 21 gpe-todo | [] | 7 gphoto2 | [] [] [] [] | 20 gprof | [] [] | 11 gpsdrive | | 4 gramadoir | [] | 7 grep | [] [] [] [] | 34 gretl | | 4 gsasl | [] [] | 8 gss | [] | 5 gst-plugins | [] [] [] | 15 gst-plugins-base | [] [] [] | 9 gst-plugins-good | [] [] [] [] [] | 20 gstreamer | [] [] [] | 17 gtick | [] | 3 gtkam | [] | 13 gtkorphan | [] | 7 gtkspell | [] [] [] [] [] [] | 26 gutenprint | | 3 hello | [] [] [] [] [] | 37 id-utils | [] [] | 14 impost | [] | 4 indent | [] [] [] [] | 25 iso_3166 | [] [] [] [] | 16 iso_3166_2 | | 2 iso_4217 | [] [] | 14 iso_639 | [] | 14 jpilot | [] [] [] [] | 7 jtag | [] | 3 jwhois | [] [] [] | 13 kbd | [] [] | 12 keytouch | [] | 4 keytouch-editor | | 2 keytouch-keyboa... | [] | 3 latrine | [] [] | 8 ld | [] [] [] [] | 8 leafpad | [] [] [] [] | 23 libc | [] [] [] | 23 libexif | [] | 4 libextractor | [] | 5 libgpewidget | [] [] [] | 19 libgpg-error | [] | 4 libgphoto2 | [] | 8 libgphoto2_port | [] [] [] | 11 libgsasl | [] | 8 libiconv | [] | 7 libidn | [] [] | 10 lifelines | | 4 lilypond | | 2 lingoteach | [] | 6 lynx | [] [] [] | 15 m4 | [] [] [] | 18 mailutils | [] | 8 make | [] [] [] | 20 man-db | [] | 6 minicom | [] | 14 mysecretdiary | [] [] | 12 nano | [] [] | 17 nano_1_0 | [] [] [] | 18 opcodes | [] [] | 10 parted | [] [] [] | 10 pilot-qof | [] | 3 psmisc | [] | 10 pwdutils | [] | 3 python | | 0 qof | [] | 4 radius | [] | 6 recode | [] [] [] | 25 rpm | [] [] [] [] | 14 screem | [] | 2 scrollkeeper | [] [] [] [] | 26 sed | [] [] [] | 22 sh-utils | [] | 15 shared-mime-info | [] [] [] [] | 24 sharutils | [] [] [] | 23 shishi | | 1 silky | [] | 4 skencil | [] | 7 sketch | | 6 solfege | | 2 soundtracker | [] [] | 9 sp | [] | 3 stardict | [] [] [] [] | 11 system-tools-ba... | [] [] [] [] [] [] [] | 37 tar | [] [] [] [] | 20 texinfo | [] [] [] | 15 textutils | [] [] [] | 17 tin | | 1 tp-robot | [] [] [] | 10 tuxpaint | [] [] [] | 16 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] [] | 20 vorbis-tools | [] [] | 11 wastesedge | | 1 wdiff | [] [] | 22 wget | [] [] [] | 19 xchat | [] [] [] [] | 29 xkeyboard-config | [] [] [] [] | 11 xpad | [] [] [] | 14 +---------------------------------------------------+ 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu 170 domains 0 1 1 77 39 0 136 10 1 48 5 54 0 2028 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If October 2006 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. partclone-0.2.51/AUTHORS000066400000000000000000000003521200565264100146370ustar00rootroot00000000000000This file is part of partclone package Copyright (C) 2006, 2007 by Steven Shiau (steven _at nchc org tw) Jazz Wang (jazz _at_ nchc org tw) Thomas Tsai (thomas _at_ nchc org tw) NCHC Free Software Labs, Taiwan. http://www.nchc.org.tw partclone-0.2.51/COPYING000066400000000000000000000430761200565264100146340ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. partclone-0.2.51/ChangeLog000066400000000000000000002574301200565264100153540ustar00rootroot000000000000002012-07-31 Thomas Tsai update some docs 2012-07-30 Thomas Tsai update version to 0.2.51 update process for elapsed time over 24hr 2012-07-25 Thomas Tsai update supported list 2012-07-13 Thomas Tsai update makefile 2012-07-10 Thomas Tsai version 0.2.50 update test and size information add test for exfat update exfat and add exfat man docs add exfat 2012-06-27 Thomas Tsai add more detail message in image head output 2012-06-15 Thomas Tsai add partclone.btrfs.8 update control update control fix quiet mode issue. The issue make partclone can't stop/finish even action is done. bug report from pille 2012-05-30 Thomas Tsai update manpage 2012-05-29 Thomas Tsai update docs update docs 2012-05-18 Thomas Tsai minor update readme 2012-05-16 Thomas Tsai update TODO 2012-05-01 Thomas Tsai Merge branch 'master' of partclone.nchc.org.tw:/home/partclone update vmfs for some unallocated block 2012-04-29 Thomas Tsai A partclone bug found when it backs up WindowsServer2008R2 (64bit) on 2012-04-26 Thomas Tsai update bitmap progress 2012-04-26 thomas ignore unallocated block for vmfs 2012-04-19 Thomas Tsai update control for vmfs 2012-04-18 Thomas Tsai 0.2.47 update fresh done update fresh, add sleep in progress thread to reduce cpu usage, contributed and bug information from http://sourceforge.net/tracker/?func=detail&aid=3509757&group_id=115473&atid=671650 2012-04-12 Thomas Tsai change row to raw, noticed from Vincent van Adrighem try to fix ID: 3509757 from clonezilla track system 2012-04-01 Thomas Tsai update vmfs5 2012-03-29 Thomas Tsai remove vmfs5clone.c 2012-03-28 Thomas Tsai update for vmfs-tool 0.2.5 come back Merge branch 'master' of partclone.nchc.org.tw:/home/partclone update for vmfs-tool 0.2.5 Merge branch 'fixcrc' remove new crc and accept vmfs5 update for vmfs-tool 0.2.5 2012-03-27 Thomas Tsai crc32 2012-02-17 Matthew Booth Make crc32() explicitly 32 bit Remove redundant copy of crc_buffer Allocate crc_buffer on the stack Avoid repeated malloc/free of a 4 byte buffer by allocating crc_buffer on the stack. Make constant string static const *const Minor log message cleanup 2012-02-11 Thomas Tsai add partclone.vmfs5 ignored update vmfs5 2012-02-09 Thomas Tsai add vmfs5clone.c to clone vmfs5 update vmfs5 update makefile to create partclone.vmfs5 2012-02-08 Thomas Tsai 0.2.46 * accept patch from Rommer to update memory usage * update document, some example error. * update vmfsclone to backup vmfs5 well 2012-01-28 Thomas Tsai merge update manpages 2012-01-18 Thomas Tsai add compatibility of vmfs3 and vmfs5 2012-01-17 Thomas Tsai print vmfs version from fstype update pui for mode dev-yo-dev 2012-01-05 Thomas Tsai update for vmfs 2011-12-27 Thomas Tsai 0.2.43 add option B to disable block detail 0.2.42 add finish progress to dd 0.2.41 add thread to dd, restore and chkimg 2011-12-26 Thomas Tsai add thread to display progress, draft update progress bar 2011-12-23 Thomas Tsai add block status update progress seeking at 100% 2011-12-12 Thomas Tsai update version to "1.0" at ntfsfixboot.c line 218 0.2.39 update ntfsfixboot.c to version 1.0 2011-11-25 Thomas Tsai 0.2.38 update for progress 2011-11-23 Thomas Tsai update for makefile for ncursesw release 0.2.37 add -I/usr/include/ncursesw/ 2011-11-09 Thomas Tsai 0.2.36 update ncurses size 2011-11-02 Thomas Tsai update toolbox update toolbox update toolbox update toolbox update 2011-11-01 Thomas Tsai move partclone.spec to README.Packages/partclone.spec remove debian add debian update TODO re remove debian add debian update version script save last changelog ($version) update control for debian-sid move debian folder to README.Packages as sample 2011-10-31 Thomas Tsai update autoconf and automake for squeeze 2011-10-27 Thomas Tsai update script folder done update debain/control re release 0.2.33 update test script 2011-10-27 root update memory mangment update memory managment 2011-10-26 root update ncurses 2011-10-26 Thomas Tsai test ncurses progress bar 2011-10-25 Thomas Tsai update 0.2.33 2011-10-19 Thomas Tsai release 0.2.32 update test script add bitmap.h 2011-10-18 Thomas Tsai accept patch from Rommer 2011-10-12 Thomas Tsai release 0.2.31 2011-10-13 Thomas Tsai update for vmfs5 2011-10-11 Thomas Tsai patch vmfs and release patch for new vmfs library 2011-09-14 Thomas Tsai performance issue from Randy Syring "I came across something you may want to update: in get_image_bitmap() you loop through the blocks and increment bused and bfree. However, those values are only used if debug >= 2. Seems like that loop could be moved inside the if statement just below it." 2011-09-12 Thomas Tsai release 0.2.29 2011-09-10 Thomas Tsai release 0.2.29 2011-09-09 Thomas Tsai make e2fs compact for squeeze 2011-09-05 Thomas Tsai update configure update ncurses for sid 2011-08-30 Thomas Tsai fix bug for reiserfs 0.2.27 0.2.27 accept suggestion from Paul, many thanks Merge branch 'master' of partclone.nchc.org.tw:/home/partclone accept patches from Georges - 10-configure.ac.patch removes a flag '-static' in a compilation - 20-manpages fixes a few typos in manpages (s/sp1/sp 1/) - 30-fixIntTypes fixes a more subtle bug, it make the definition of integer types more precise and architecture-agnostic. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636927 2011-08-18 Thomas Tsai try to release dbg version update test script release 0.2.26 stable update help description update test script 2011-08-17 Thomas Tsai add dbg package script can do basic test for developer initial extra test script 2011-08-14 Thomas Tsai Merge branch 'master' of ssh://partclone.nchc.org.tw/home/partclone 2011-08-15 Thomas Tsai release version 0.2.25 update for e2fslibs 1.42~WIP-2011-07-02 2011-08-14 Thomas Tsai release version 0.2.25 update configure.ac for new e2fslibrary 2011-08-01 Thomas Tsai compact ntfs and ntfs-3g 2011-07-28 Thomas Tsai add ntfs-3g library support for ntfs accept patch from Arkadiusz Patyk because In PLD Linux now we switch from ntfsprog to ntfs-3g. update patch and try to keep ntfsprogs. 2011-05-24 Thomas Tsai release 0.2.4 with deb file * accept patch from Ian Abbott. * Ian Abbott realized it would be quicker if it only copied the in-use areas of the partition. ddrescue has a '--domain-log=FILE' option which can be used to restrict it to certain areas, so the problem is to create such a domain log file to cover the areas used by the filesystem on the partition. ... check mail list to get more details... 2011-05-14 Thomas Tsai Merge branch '0.2.8-update' of partclone.nchc.org.tw:/home/partclone into 0.2.8-update add docbook style manpages : partclone.xxx.xml 2011-04-28 Thomas Tsai update test script add chkimg test add test 2011-04-22 Thomas Tsai lost xxxfs.8 add template man page for all file system update marco so release 0.2.23 for better manpages 2011-04-13 Thomas Tsai update gitignore update manual as link update manual update man 2011-03-28 Thomas Tsai 0.2.22 release typo error for progress 2011-03-22 Thomas Tsai release version 0.2.21 fix bug for partclone.dd 2011-03-21 Thomas Tsai Merge branch '0.2.8-update' of partclone.nchc.org.tw:/home/partclone into 0.2.8-update fix bug for partclone.dd 2011-03-17 Thomas Tsai release 0.2.20 2011-03-14 Thomas Tsai fix partclone.dd / partclone.restore hard to show right message for stdin data. We use target size as source size for the special case. 2011-03-09 Thomas Tsai 0.2.19: fixbug: progress fail when just 10 block restore release 0.2.19 update makefile for btrfs 2011-02-18 Thomas Tsai * add option max_block_cache to get better performance escpcially small block size(fat) * update typo error * Version 0.2.18 2011-01-25 Thomas Tsai update ChangeLog fix ufs error update ext4 mismatch and new release version 2011-01-18 Thomas Tsai fix commit: replace reiserfs with ntfs, thanks for Marcos Felipe Rasia de Mello 2011-01-13 Thomas Tsai fix bug for ufs unclean 2010-11-02 Thomas Tsai update POs 2010-11-01 Thomas Tsai Fix configure.ac and makefile.am and accept patchs from Cedric OLLIVIER ollivier.cedric _at_ gmail.com. 2010-10-06 Thomas Tsai update version 0.2.16 * add option --quiet to disable progress bar * add option --restoew_row_file to restore to special row file for loop device 2010-09-01 Thomas Tsai fix btrfs bug fix btrfs clone lost update some files update version and add fr_FR locale 2010-08-31 Thomas Tsai Bug fixed: btrfs clone fail, lost some metadata message 2010-08-22 Thomas Tsai update changelog update version release test version remove other btfs files add btrfs support 2010-07-28 Thomas Tsai fix buf for jfsclone autoreconf * add link partclone.VMFS_volume_member * fix bug: jfsclone segfault * add debian/control pkg-config 2010-07-01 Thomas Tsai fix bug of jfsclone fix jfs: set unknown status bock as used fix bug for jfs_logform 2010-06-30 Thomas Tsai update changelog update makefile.am for jfs remove jfs_devices.h jfs_devices.c update version to 0.2.12 add libjfs to control file and get libjfs...deb from partclone.nchc.org.tw/download/misc/ 2010-06-29 Thomas Tsai add support for jfs 2010-06-09 Thomas Tsai update debian/changlog update to 0.2.11 add Build-Depends libvmfs fix xfsclone.c: conflicting types for ‘set_bitmap’ 2010-05-19 Thomas Tsai release testing 0.2.10 remove one not necessary message release 0.2.10 for xfsclone 2010-05-15 thomas * update xfsclone.c 2010-05-11 thomas * try to merge from new xfs clone * replace memcpy to strncpy to avoid accessing memory beyond string terminator * and patch from Andre Przywara , many thanks. fix bug about chkimg fail 2010-04-29 thomas * release 0.2.9 fix bug: alloc double memory for bitmap when restore. fix bug: bitmap error for over 8.7T partition backup and restore. 2010-04-23 thomas fix xfsclone error 2010-04-12 Thomas Tsai initial new xfsclone 2010-04-01 Thomas Tsai fix about: extfsclone do fs_check and report error message when mounted times larger than fs default, but error message lost report mounted times. 2010-03-29 Thomas Tsai update version to 0.2.8 * make progress bar update faster * fix progress to make calculating bitmap takes faster 2010-03-16 Thomas Tsai add git ignore files and fix toolbox to create right git commit hash update progress bar 2010-03-15 Thomas Tsai * update version to 0.2.6 * try to fix progress rate * also change to partclone.c to fix print_readable_size modified: src/partclone.c modified: src/progress.c 2010-03-12 Thomas Tsai update size number show partition size more cleanly Merge branch 'master' of partclone.nchc.org.tw:/home/partclone 2010-03-12 thomas * fix rate = 0, hide the size for bitmap only. * print readable size * update version * update changelog 2010-03-11 thomas * fix rate = 0, hide the size for bitmap only. * print readable size * update version 2010-03-10 Thomas Tsai update deb changelog set version to 0.2.4 add export version 2010-03-10 thomas add git revision by attribute update process inf error new file: .gitattributes modified: src/progress.c modified: src/version.h 2010-03-02 Thomas Tsai add -v option to display VERSION and git version remove unnecessary code 2010-03-01 thomas try to build package via git build package modified: ChangeLog modified: debian/changelog modified: po/partclone.pot modified: po/zh_TW.gmo modified: po/zh_TW.po modified: toolbox git-svn-id: svn+ssh://140.110.240.196/partclone_svn@363 93b75dfe-da2d-4241-a08d-2141769abc04 ~ update message of fstype ~ replace to git repository ~ update version display ~ add gitlog-to-changelog to convert git log to ChangeLog On branch master Changes to be committed: new file: gitlog-to-changelog modified: ChangeLog modified: configure modified: configure.ac modified: src/chkimg.c modified: src/fstype.c modified: src/partclone.c modified: src/version.h modified: toolbox git-svn-id: svn+ssh://140.110.240.196/partclone_svn@362 93b75dfe-da2d-4241-a08d-2141769abc04 update version number modified: Makefile.am modified: Makefile.in modified: configure modified: configure.ac modified: src/Makefile.am modified: src/Makefile.in modified: src/version.h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@361 93b75dfe-da2d-4241-a08d-2141769abc04 2010-02-24 thomas * add fstype.c to test vmfs filesystem like blkid do. We can run partclone.fstype to detect partition is vmfs or not, just run _$ ./partclone.fstype /dev/sda1 type: vmfs if partition is vmfs, fstype return string "type: vmfs" with exit "0". if not vmfs you can find reason with exit 1. * update files: modified: configure modified: src/Makefile.am modified: src/Makefile.in new file: src/fstype.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@360 93b75dfe-da2d-4241-a08d-2141769abc04 2010-02-14 steven Pack the release for 0.2.0-2. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@359 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-27 thomas * add vmfs check to autoconf * update vmfsclone modified: Makefile.in modified: aclocal.m4 modified: config.h.in modified: configure modified: configure.ac modified: docs/Makefile.in modified: po/zh_TW.gmo modified: po/zh_TW.po modified: src/Makefile.am modified: src/Makefile.in modified: src/version.h modified: src/vmfsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@358 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-22 thomas The vmfsclone initial version. Just a experimental one can clone/restore vmfs partition. Thanks for vmfs-tools author, mike and cf. The vmfsclone shoud be keep update and do more testing. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@357 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-19 thomas * lose log mesg about bitmap_size and ntfs->lcnbmp_na->data_size data. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@356 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-18 thomas translate and smal update progress bar. modified: po/partclone.pot modified: po/zh_TW.gmo modified: po/zh_TW.po modified: src/progress.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@355 93b75dfe-da2d-4241-a08d-2141769abc04 update progress bar stop value. modified: src/ddclone.c modified: src/main.c modified: src/restore.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@354 93b75dfe-da2d-4241-a08d-2141769abc04 update progress bar. the new progress update by time. modified: src/ddclone.c modified: src/main.c modified: src/progress.c modified: src/progress.h modified: src/restore.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@353 93b75dfe-da2d-4241-a08d-2141769abc04 update ntfsclone-ng.c, accept and test the ntfs readbitmap patch, it's contributed by javor. Thank you. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@352 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-12 thomas update progress.c to fix avg rate number. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@351 93b75dfe-da2d-4241-a08d-2141769abc04 update progress bug, real done when finish procress. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@350 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-08 thomas * check the result of ntfs function call. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@349 93b75dfe-da2d-4241-a08d-2141769abc04 * update image_hdr for initializing. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@348 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-07 thomas * update version * initial image_hdr first Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit. On branch initial_image_hdr Changes to be committed: (use "git reset HEAD ..." to unstage) modified: configure modified: configure.ac modified: debian/changelog modified: po/partclone.pot modified: po/zh_TW.gmo modified: po/zh_TW.po modified: src/main.c modified: src/progress.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@347 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-06 thomas * add mtrace for debug * fix partclone.ntfs free/fs_close error, thank Javor reference: http://sourceforge.net/mailarchive/forum.php?thread_name=8e45d0591001051533n1378e8acvcbfd59c77ebca0de%40mail.gmail.com&forum_name=partclone-user * fix some memory leak problem. modified: src/main.c modified: src/ntfsclone-ng.c modified: src/partclone.c modified: src/version.h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@346 93b75dfe-da2d-4241-a08d-2141769abc04 2010-01-05 thomas make sure progress bar show 100%. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@345 93b75dfe-da2d-4241-a08d-2141769abc04 2009-11-25 steven Updated for 0.1.9-5. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@344 93b75dfe-da2d-4241-a08d-2141769abc04 2009-11-19 thomas try to fix hfsplus error for 2 or more extents. modified: hfsplusclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@343 93b75dfe-da2d-4241-a08d-2141769abc04 2009-11-16 thomas update version number git-svn-id: svn+ssh://140.110.240.196/partclone_svn@342 93b75dfe-da2d-4241-a08d-2141769abc04 add control for ufs add changelog git-svn-id: svn+ssh://140.110.240.196/partclone_svn@341 93b75dfe-da2d-4241-a08d-2141769abc04 * update progress bar lang translation. * update ufs as default enabled file system. modified: configure modified: configure.ac modified: po/partclone.pot modified: po/zh_TW.gmo modified: po/zh_TW.po git-svn-id: svn+ssh://140.110.240.196/partclone_svn@340 93b75dfe-da2d-4241-a08d-2141769abc04 test progress 1 modified: src/progress.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@339 93b75dfe-da2d-4241-a08d-2141769abc04 2009-11-03 steven partclone (0.1.9-3) unstable; urgency=low [ Yu-Chin Tsai ] * An option to ignore CRC checking was added. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@338 93b75dfe-da2d-4241-a08d-2141769abc04 2009-11-02 thomas update ignore_crc in main.c add ignore_crc to restore.c DON'T IGNORE CRC in 64BIT IMAGE !!! git-svn-id: svn+ssh://140.110.240.196/partclone_svn@337 93b75dfe-da2d-4241-a08d-2141769abc04 2009-10-09 steven Updated changelog for partclone 0.1.9-2. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@336 93b75dfe-da2d-4241-a08d-2141769abc04 2009-10-06 thomas update log message and open fail message for ufsclone. Thank dswartz for testing ufs backup and report. modified: src/ufsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@335 93b75dfe-da2d-4241-a08d-2141769abc04 2009-10-02 thomas bug fix for ufscline git-svn-id: svn+ssh://140.110.240.196/partclone_svn@334 93b75dfe-da2d-4241-a08d-2141769abc04 update option value git-svn-id: svn+ssh://140.110.240.196/partclone_svn@333 93b75dfe-da2d-4241-a08d-2141769abc04 add ignore fschk for xfs. modified: xfsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@332 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-27 thomas add option Ignore_crc, but need more test. fix bug of --rescue update malloc for I/O performance modified: src/ddclone.c modified: src/main.c modified: src/partclone.c modified: src/partclone.h modified: src/restore.c modified: src/version.h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@331 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-22 thomas add ufs include dir On branch master new file: ufs/ffs/fs.h new file: ufs/libufs.h new file: ufs/sys/disklabel.h new file: ufs/ufs/dinode.h new file: ufs/ufs/fs.h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@330 93b75dfe-da2d-4241-a08d-2141769abc04 update ufsclone merge error. On branch master Changes to be committed: modified: src/ufsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@329 93b75dfe-da2d-4241-a08d-2141769abc04 fix hfsplus message modified: src/hfsplusclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@328 93b75dfe-da2d-4241-a08d-2141769abc04 update fs log message. add ignore option to all supported file system. Changes to be committed: (use "git reset HEAD ..." to unstage) modified: extfsclone.c modified: fatclone.c modified: hfsplusclone.c modified: ntfsclone-ng.c modified: reiser4clone.c modified: reiserfsclone.c modified: ufsclone.c modified: xfsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@327 93b75dfe-da2d-4241-a08d-2141769abc04 ignore fschk fro extfs modified: extfsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@326 93b75dfe-da2d-4241-a08d-2141769abc04 New feature: ignore file system check for reiserfs, -I or --ignore_fschk. On branch log Changes to be committed: new file: fs_common.h modified: main.c modified: partclone.c modified: partclone.h modified: reiserfsclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@325 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-18 steven updated for 0.1.9-1. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@324 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-17 thomas update changelog to test svn-buildpackage git-svn-id: svn+ssh://140.110.240.196/partclone_svn@323 93b75dfe-da2d-4241-a08d-2141769abc04 * update version * update log git-svn-id: svn+ssh://140.110.240.196/partclone_svn@322 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-14 thomas ufs test ok. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@321 93b75dfe-da2d-4241-a08d-2141769abc04 update for checking ufs status. Committer: thomas On branch master Changes to be committed: (use "git reset HEAD ..." to unstage) modified: src/ufsclone.c modified: src/ufsclone.h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@320 93b75dfe-da2d-4241-a08d-2141769abc04 update configure.ac git-svn-id: svn+ssh://140.110.240.196/partclone_svn@319 93b75dfe-da2d-4241-a08d-2141769abc04 Committer: thomas On branch master Changes to be committed: (use "git reset HEAD ..." to unstage) modified: src/xfsclone.c bug fix for xfs clone fail. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@318 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-07 thomas add autotool script for ufs. The option --enable-all not include ufs right now. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@317 93b75dfe-da2d-4241-a08d-2141769abc04 2009-09-03 thomas first time ufs back/restore successfully. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@316 93b75dfe-da2d-4241-a08d-2141769abc04 update automake andd ufsclone git-svn-id: svn+ssh://140.110.240.196/partclone_svn@315 93b75dfe-da2d-4241-a08d-2141769abc04 Merge 140.110.240.52:/home/partimag/workspace/partclone git-svn-id: svn+ssh://140.110.240.196/partclone_svn@314 93b75dfe-da2d-4241-a08d-2141769abc04 2009-08-10 thomas update version function update usage git-svn-id: svn+ssh://140.110.240.196/partclone_svn@313 93b75dfe-da2d-4241-a08d-2141769abc04 update svn version git-svn-id: svn+ssh://140.110.240.196/partclone_svn@312 93b75dfe-da2d-4241-a08d-2141769abc04 2009-08-09 steven * Bug fixed: FAT clone failure was fixed. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@311 93b75dfe-da2d-4241-a08d-2141769abc04 2009-07-31 thomas update fat problem! fix bug about fat clone fail. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@310 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-24 steven updated for 0.1.1-15. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@309 93b75dfe-da2d-4241-a08d-2141769abc04 updated for 0.1.1-15 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@308 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-24 thomas remove Makefile git-svn-id: svn+ssh://140.110.240.196/partclone_svn@307 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-24 steven updated for version 0.1.1-14. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@306 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-24 thomas update makefile for version.h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@305 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-19 steven Updated for version 0.1.1-13. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@304 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-19 thomas Merge branch 'test' git-svn-id: svn+ssh://140.110.240.196/partclone_svn@303 93b75dfe-da2d-4241-a08d-2141769abc04 Merge branch 'test' git-svn-id: svn+ssh://140.110.240.196/partclone_svn@302 93b75dfe-da2d-4241-a08d-2141769abc04 Merge branch 'test' Conflicts: partclone/src/version.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@301 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-17 steven Updated for version 0.1.1-12. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@300 93b75dfe-da2d-4241-a08d-2141769abc04 Updated for version 0.1.1-12. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@299 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-16 thomas update Makefile in debian lenny update src/chkimg.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@298 93b75dfe-da2d-4241-a08d-2141769abc04 add option --logfile or -L to specify file for log message. update Makefile for chkimg modified: Makefile.in modified: aclocal.m4 modified: configure modified: docs/Makefile.in new file: src/Makefile modified: src/chkimg.c new file: src/config.h modified: src/ddclone.c modified: src/infoclone.c modified: src/main.c modified: src/partclone.c modified: src/partclone.h modified: src/restore.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@297 93b75dfe-da2d-4241-a08d-2141769abc04 The partclone.chkimg could help you check img by CRC. modified: src/Makefile.am modified: src/Makefile.in new file: src/chkimg.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@296 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-13 steven Updated for version 0.1.1-11. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@295 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-10 thomas update clear_buf git-svn-id: svn+ssh://140.110.240.196/partclone_svn@294 93b75dfe-da2d-4241-a08d-2141769abc04 accept patch from Kristian Erik Hermansen. fix progress.c:152 SECURITY: fprintf call should have "%s" as argument 1 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@293 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-10 steven Updated for 0.1.1-10. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@292 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-09 thomas update pointer problem modified: src/progress.c modified: src/restore.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@291 93b75dfe-da2d-4241-a08d-2141769abc04 update message and hfsplus modified: src/hfsplusclone.c modified: src/main.c modified: src/version.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@290 93b75dfe-da2d-4241-a08d-2141769abc04 try to fix hfsplus problem-1 modified: src/hfsplusclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@289 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-08 thomas update tmp_str scale to 512. tkx Kristian Erik Hermansen and Piavlo Re: [Clonezilla-user] partclone v0.1.0 - buffer overflow detected git-svn-id: svn+ssh://140.110.240.196/partclone_svn@288 93b75dfe-da2d-4241-a08d-2141769abc04 remove message done! git-svn-id: svn+ssh://140.110.240.196/partclone_svn@287 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-02 steven * Some output messages were polished again. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@286 93b75dfe-da2d-4241-a08d-2141769abc04 Output messages of restoring were updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@285 93b75dfe-da2d-4241-a08d-2141769abc04 Output message when restoring will be shown as "Please wait... done!" git-svn-id: svn+ssh://140.110.240.196/partclone_svn@284 93b75dfe-da2d-4241-a08d-2141769abc04 Updated for version 0.1.1-8. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@283 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-02 thomas update message for restore git-svn-id: svn+ssh://140.110.240.196/partclone_svn@282 93b75dfe-da2d-4241-a08d-2141769abc04 update: add "done" after "please wait" git-svn-id: svn+ssh://140.110.240.196/partclone_svn@281 93b75dfe-da2d-4241-a08d-2141769abc04 update: add new line after Please wait... modified: main.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@280 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-01 steven Updated for 0.1.1-7. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@279 93b75dfe-da2d-4241-a08d-2141769abc04 updated for partclone 0.1.1-7. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@278 93b75dfe-da2d-4241-a08d-2141769abc04 2009-06-01 thomas fix bug for progress update with nogui add "Calculating bitmap..." without -d option git-svn-id: svn+ssh://140.110.240.196/partclone_svn@277 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-30 steven Updated for version 0.1.1-6 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@276 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-28 thomas update for 64 bit I found a crc problem and should be fix in the next image version. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@275 93b75dfe-da2d-4241-a08d-2141769abc04 update crc in 64 bit image problem again... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@274 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-27 steven Updated for 0.1.1-5. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@273 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-27 thomas bug of time calculating git-svn-id: svn+ssh://140.110.240.196/partclone_svn@272 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-27 steven Updated for version 0.1.1-4. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@271 93b75dfe-da2d-4241-a08d-2141769abc04 * Update default RES from 10000 to 1000. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@270 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-27 thomas update default RES from 10000 to 1000 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@269 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-27 steven updated for 0.1.1-3 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@268 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-27 thomas test for open block file git-svn-id: svn+ssh://140.110.240.196/partclone_svn@267 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-22 steven updated for 0.1.1-2 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@266 93b75dfe-da2d-4241-a08d-2141769abc04 updated for partclone (0.1.1-2). git-svn-id: svn+ssh://140.110.240.196/partclone_svn@265 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-22 thomas add link of partclone.ntfsreloc git-svn-id: svn+ssh://140.110.240.196/partclone_svn@264 93b75dfe-da2d-4241-a08d-2141769abc04 It's possible to create new file as target for restore after this commit... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@263 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-21 thomas add argument -f, --UI-fresh to set fresh time of progress bar ex: -f 10 // set fresh progress per 10*100 blocks The default fresh is 10000... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@262 93b75dfe-da2d-4241-a08d-2141769abc04 update for xfs progress git-svn-id: svn+ssh://140.110.240.196/partclone_svn@261 93b75dfe-da2d-4241-a08d-2141769abc04 pre release... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@260 93b75dfe-da2d-4241-a08d-2141769abc04 update CRC read error message git-svn-id: svn+ssh://140.110.240.196/partclone_svn@259 93b75dfe-da2d-4241-a08d-2141769abc04 update progress init git-svn-id: svn+ssh://140.110.240.196/partclone_svn@258 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-20 thomas update for pui git-svn-id: svn+ssh://140.110.240.196/partclone_svn@257 93b75dfe-da2d-4241-a08d-2141769abc04 * update version git-svn-id: svn+ssh://140.110.240.196/partclone_svn@256 93b75dfe-da2d-4241-a08d-2141769abc04 * add progress for bitmap * update structure of progress * update structure of Ncurses... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@255 93b75dfe-da2d-4241-a08d-2141769abc04 * Before this commit, partclone restore fail from 64 bit img to 32 bit. It's because the size of Unsigned long is 8 bytes in 64 bit, and 4 bytes in 32 bit partclone. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@254 93b75dfe-da2d-4241-a08d-2141769abc04 update crc test git-svn-id: svn+ssh://140.110.240.196/partclone_svn@253 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-19 thomas * display progress bar when readbitmap * normalize update time, but could be better git-svn-id: svn+ssh://140.110.240.196/partclone_svn@252 93b75dfe-da2d-4241-a08d-2141769abc04 test progress of bitmap git-svn-id: svn+ssh://140.110.240.196/partclone_svn@251 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-14 thomas * add print_partclone_info() * add more informatio to stderr * check all utilities work right git-svn-id: svn+ssh://140.110.240.196/partclone_svn@250 93b75dfe-da2d-4241-a08d-2141769abc04 add more information to know the process modified: main.c modified: partclone.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@249 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-05 thomas remove ntfsreloc git-svn-id: svn+ssh://140.110.240.196/partclone_svn@248 93b75dfe-da2d-4241-a08d-2141769abc04 add ntfsfixboot.c from http://cc.jct.ac.il/~shaneh/ntfsfixboot.c git-svn-id: svn+ssh://140.110.240.196/partclone_svn@247 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-01 steven updated for 0.1.0-10. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@246 93b75dfe-da2d-4241-a08d-2141769abc04 * Bug fixed: clonezilla-Bugs-2784676. Thanks to njorl _at_ users sourceforge net. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@245 93b75dfe-da2d-4241-a08d-2141769abc04 changelog updated for bug fixed: clonezilla-Bugs-2784676. Thanks to njorl _at_ users sourceforge net. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@244 93b75dfe-da2d-4241-a08d-2141769abc04 2009-05-01 thomas update for fs_open git-svn-id: svn+ssh://140.110.240.196/partclone_svn@243 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-29 thomas update po git-svn-id: svn+ssh://140.110.240.196/partclone_svn@242 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-27 steven zh_TW po related files were updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@241 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-26 steven version.c automatically updated for 0.1.0-9. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@240 93b75dfe-da2d-4241-a08d-2141769abc04 Changelogs were updated for 0.1.0-9. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@239 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-25 steven Output message "clone successfully" was changed as "Cloned successfully.". git-svn-id: svn+ssh://140.110.240.196/partclone_svn@238 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-24 steven Updated for 0.1.0-8. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@237 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-24 thomas add EXECNAME git-svn-id: svn+ssh://140.110.240.196/partclone_svn@236 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-24 steven "clone successfully" was changed to "Successfully cloned." git-svn-id: svn+ssh://140.110.240.196/partclone_svn@235 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-23 steven updated for 0.1.0-7 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@234 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-23 thomas add link partclone.ext4dev git-svn-id: svn+ssh://140.110.240.196/partclone_svn@233 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-18 steven Updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@232 93b75dfe-da2d-4241-a08d-2141769abc04 Updated for version 0.1.0-6. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@231 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-17 thomas fix partclone.restore can't get source data from pipe which is organized FS. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@230 93b75dfe-da2d-4241-a08d-2141769abc04 update po files git-svn-id: svn+ssh://140.110.240.196/partclone_svn@229 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-16 thomas update check fs type and error message for reiser4, reiserfs, xfs, ntfs and extfs. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@228 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-16 steven www.partclone.org was changed to partclone.org. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@227 93b75dfe-da2d-4241-a08d-2141769abc04 Updated for partclone 0.1.0-5 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@226 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-16 thomas * update ext2/3/4 message * fix bug, update check_size return value git-svn-id: svn+ssh://140.110.240.196/partclone_svn@225 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-16 steven Update chnagelog for release 0.1.0-4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@224 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-16 thomas update * EXECNAME in xxxclone.c * change description of dd-mode as dev-to-dev Local copy... * fix bug about get_partition size git-svn-id: svn+ssh://140.110.240.196/partclone_svn@223 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-15 steven [ Thomas Tsai ] * Bug fixed: partclone.ntfs statistics data was wrong when doing partition to partition clone. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@222 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-15 thomas update xfs unknow to unknown git-svn-id: svn+ssh://140.110.240.196/partclone_svn@221 93b75dfe-da2d-4241-a08d-2141769abc04 update #include git-svn-id: svn+ssh://140.110.240.196/partclone_svn@220 93b75dfe-da2d-4241-a08d-2141769abc04 * update for #49, configure error with FC10 * try to fix ntfs used space git-svn-id: svn+ssh://140.110.240.196/partclone_svn@219 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-10 steven * --enable-static is on again. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@218 93b75dfe-da2d-4241-a08d-2141769abc04 * Disable static linking * e2fslibs-dev (>= 1.41.3) is required for partclone.ext4. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@217 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-10 thomas add ext4 link again.... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@216 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-07 thomas r341@T-X61: thomas | 2009-04-07 23:06:22 +0800 update Makefile.am: add pthread link for build static partclone.extfs with Debiab/lenny. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@215 93b75dfe-da2d-4241-a08d-2141769abc04 update ChangeLog git-svn-id: svn+ssh://140.110.240.196/partclone_svn@214 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-03 thomas update progress.c set default progress update threshold as 10. partclone update progress bar per 10 copied blocks. but the performance not speedup. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@213 93b75dfe-da2d-4241-a08d-2141769abc04 test version for better performance: Idea 1: decrease the count of progress_update git-svn-id: svn+ssh://140.110.240.196/partclone_svn@212 93b75dfe-da2d-4241-a08d-2141769abc04 2009-04-01 thomas The unstable version has merged to stable and move to backup. The testing is branch from stable. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@211 93b75dfe-da2d-4241-a08d-2141769abc04 2009-03-31 thomas update make file * add partclone.ext4 link git-svn-id: svn+ssh://140.110.240.196/partclone_svn@210 93b75dfe-da2d-4241-a08d-2141769abc04 2009-03-12 thomas update size of device and volume git-svn-id: svn+ssh://140.110.240.196/partclone_svn@209 93b75dfe-da2d-4241-a08d-2141769abc04 2009-03-05 thomas merger from unstable git-svn-id: svn+ssh://140.110.240.196/partclone_svn@208 93b75dfe-da2d-4241-a08d-2141769abc04 r214@T-X61: thomas | 2009-03-05 02:54:25 +0800 update configure by autoreconf update partclone.c * return 0 from io_all to check EOF * can't vfprintf twice between va_start to va_end in log_mesg git-svn-id: svn+ssh://140.110.240.196/partclone_svn@207 93b75dfe-da2d-4241-a08d-2141769abc04 update for va_start, make sure vsprintf is right for x86_64 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@206 93b75dfe-da2d-4241-a08d-2141769abc04 2009-03-04 thomas update deplib_version.c to check library version git-svn-id: svn+ssh://140.110.240.196/partclone_svn@205 93b75dfe-da2d-4241-a08d-2141769abc04 update configure for ext4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@204 93b75dfe-da2d-4241-a08d-2141769abc04 update configure.ac git-svn-id: svn+ssh://140.110.240.196/partclone_svn@203 93b75dfe-da2d-4241-a08d-2141769abc04 back to r198 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@202 93b75dfe-da2d-4241-a08d-2141769abc04 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@201 93b75dfe-da2d-4241-a08d-2141769abc04 update for lib reiser4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@200 93b75dfe-da2d-4241-a08d-2141769abc04 add partclone.ext4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@199 93b75dfe-da2d-4241-a08d-2141769abc04 update confiure git-svn-id: svn+ssh://140.110.240.196/partclone_svn@198 93b75dfe-da2d-4241-a08d-2141769abc04 r201@T-X61: thomas | 2009-03-04 00:46:06 +0800 test by svk git-svn-id: svn+ssh://140.110.240.196/partclone_svn@197 93b75dfe-da2d-4241-a08d-2141769abc04 2009-03-02 thomas add unstable/src/deplib_version.c to replace unstable/src/ntfs_version.c update configure to check library version ex: reiser4, reiserfs, extfs and ntfs. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@196 93b75dfe-da2d-4241-a08d-2141769abc04 add src/deplib_version.c to check library version for configuration. remove src/ntfs_version.c and cheange to use src/deplib_version.c . git-svn-id: svn+ssh://140.110.240.196/partclone_svn@195 93b75dfe-da2d-4241-a08d-2141769abc04 2009-02-05 thomas create a unstable branch git-svn-id: svn+ssh://140.110.240.196/partclone_svn@194 93b75dfe-da2d-4241-a08d-2141769abc04 update debug level git-svn-id: svn+ssh://140.110.240.196/partclone_svn@193 93b75dfe-da2d-4241-a08d-2141769abc04 fix bug for bitmap git-svn-id: svn+ssh://140.110.240.196/partclone_svn@192 93b75dfe-da2d-4241-a08d-2141769abc04 fix check_valid fs git-svn-id: svn+ssh://140.110.240.196/partclone_svn@191 93b75dfe-da2d-4241-a08d-2141769abc04 2009-02-04 thomas try to fix bug of ext4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@190 93b75dfe-da2d-4241-a08d-2141769abc04 2009-01-20 thomas update restore.c to support restore stdin raw file git-svn-id: svn+ssh://140.110.240.196/partclone_svn@189 93b75dfe-da2d-4241-a08d-2141769abc04 2009-01-19 thomas make partclone.dd can read stdin to restore date git-svn-id: svn+ssh://140.110.240.196/partclone_svn@188 93b75dfe-da2d-4241-a08d-2141769abc04 update for ext4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@187 93b75dfe-da2d-4241-a08d-2141769abc04 2009-01-16 thomas add partclone.dd and partclone.restore. partclone.dd set all block as used and save/restore device to/from raw data. partclone.restore is used to restore device from raw data or image build from partclone. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@186 93b75dfe-da2d-4241-a08d-2141769abc04 2009-01-12 thomas * add option force progress! use -F/--force to keep progress and just warrning for memory, disk and FS problem but dangerous. * add restore utility to restore any image which is made by partclone. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@185 93b75dfe-da2d-4241-a08d-2141769abc04 2008-12-30 steven * A bug about FAT12 was fixed. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@184 93b75dfe-da2d-4241-a08d-2141769abc04 2008-12-29 thomas update fat12 bug. The Fat 12 is ready now! git-svn-id: svn+ssh://140.110.240.196/partclone_svn@183 93b75dfe-da2d-4241-a08d-2141769abc04 2008-12-25 steven * New upstream ntfsreloc.c 0.8. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@182 93b75dfe-da2d-4241-a08d-2141769abc04 2008-12-22 steven updated with 0.0.9-2. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@181 93b75dfe-da2d-4241-a08d-2141769abc04 Updated for 0.0.9-2 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@180 93b75dfe-da2d-4241-a08d-2141769abc04 2008-12-03 thomas update fatclone.c fatclone.h clearly. update dirty message for extfs. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@179 93b75dfe-da2d-4241-a08d-2141769abc04 2008-11-18 thomas add check FAT filesystem before clone volume. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@178 93b75dfe-da2d-4241-a08d-2141769abc04 2008-11-17 thomas add check hfs_plus filesystem before clone volume. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@177 93b75dfe-da2d-4241-a08d-2141769abc04 2008-11-11 thomas check filesystem before clone partition. Partclone will make sure reiserfs, ext2/3/4, reiser4 and ntfs is clean before copy data. The check of fat, xfs and hfsplus is developing. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@176 93b75dfe-da2d-4241-a08d-2141769abc04 2008-11-07 thomas update dirty message for ntfsclone-ng git-svn-id: svn+ssh://140.110.240.196/partclone_svn@175 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-30 thomas * remove get_ntfs_version, and always compile get_ntfs_version by configure * make ntfsclone-ng.c support libntfs version 9 and 10 * never check used block between bitmap and super_block except option "-d2" git-svn-id: svn+ssh://140.110.240.196/partclone_svn@174 93b75dfe-da2d-4241-a08d-2141769abc04 update for old libntfs(9) at debian etch git-svn-id: svn+ssh://140.110.240.196/partclone_svn@173 93b75dfe-da2d-4241-a08d-2141769abc04 update configure to check ntfs_version git-svn-id: svn+ssh://140.110.240.196/partclone_svn@172 93b75dfe-da2d-4241-a08d-2141769abc04 fix get_ntfs_version to get right version number git-svn-id: svn+ssh://140.110.240.196/partclone_svn@171 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-30 steven debian/changelog and README were updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@170 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-30 thomas add man for ntfs git-svn-id: svn+ssh://140.110.240.196/partclone_svn@169 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-22 thomas update ntfsclone upgrade version to 0.0.9 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@168 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-21 thomas add src/ntfsreloc.c for partclone.ntfsreloc. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@167 93b75dfe-da2d-4241-a08d-2141769abc04 update segmentation fail for log_mesg in X86_64. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@166 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-20 thomas update configure to check libntfs version. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@165 93b75dfe-da2d-4241-a08d-2141769abc04 Add get_ntfs_version, src/ntfs_version.c to check libntfs version. update src/ntfsclone-ng.c for bitmap bug git-svn-id: svn+ssh://140.110.240.196/partclone_svn@164 93b75dfe-da2d-4241-a08d-2141769abc04 2008-10-16 thomas add ntfsreloc.c from linux-ntfs. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@163 93b75dfe-da2d-4241-a08d-2141769abc04 try to support ntfs, the ntfsclone-ng is unstable now. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@162 93b75dfe-da2d-4241-a08d-2141769abc04 try to support NTFS filesystem. unstable!!! git-svn-id: svn+ssh://140.110.240.196/partclone_svn@161 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-30 c00jhs00 update for 0.8.8 release. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@160 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-29 thomas fix-bug for fat 32 file system. The error will calculate wrong bitmap number. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@159 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-24 thomas update Makefile.am for amd64 compile with static problem. I add -lcom_err to fix "undefined reference tp 'com_err ". see #16 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@158 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-24 c00jhs00 updated notes for 0.0.8-7. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@157 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-24 thomas add partclone.pfsplus link. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@156 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-11 c00jhs00 # Bug fixed: partclone.fat12 link was not done. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@155 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-11 thomas update makefile to link fat12 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@154 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-11 c00jhs00 # fat12 was added by Thomas Tsai. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@153 93b75dfe-da2d-4241-a08d-2141769abc04 2008-07-10 thomas try to make partclone support fat12 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@152 93b75dfe-da2d-4241-a08d-2141769abc04 2008-06-28 c00jhs00 # Enable static linking. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@151 93b75dfe-da2d-4241-a08d-2141769abc04 2008-06-15 c00jhs00 Changelog updated for 0.8.2-3. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@150 93b75dfe-da2d-4241-a08d-2141769abc04 2008-06-15 thomas update for net TUI tickets: #35, Add a message like "Waiting for image" or "Please wait..." after "Calculating bitmap..." #37, Make all the words in Chinese the same - å°è±¡æª” #38, typos git-svn-id: svn+ssh://140.110.240.196/partclone_svn@149 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-25 thomas * update configure.ac to check ncurses well at different dists. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@148 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-25 c00jhs00 - partclone.sourceforge.net is replaced by www.partclone.org. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@147 93b75dfe-da2d-4241-a08d-2141769abc04 # clone.$FS was renamed as partclone.$FS by Thomas Tsai. # Version number now is 0.0.8. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@146 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-22 thomas * update dics files git-svn-id: svn+ssh://140.110.240.196/partclone_svn@145 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-20 thomas * rename man file for partclone git-svn-id: svn+ssh://140.110.240.196/partclone_svn@144 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-19 thomas * erase window to make terminal clean git-svn-id: svn+ssh://140.110.240.196/partclone_svn@143 93b75dfe-da2d-4241-a08d-2141769abc04 * fix color for probress bar git-svn-id: svn+ssh://140.110.240.196/partclone_svn@142 93b75dfe-da2d-4241-a08d-2141769abc04 * try to fix strange bug for ncurses.(http://www.stevenshiau.org/misc/partclone/partclone2.png) git-svn-id: svn+ssh://140.110.240.196/partclone_svn@141 93b75dfe-da2d-4241-a08d-2141769abc04 * accept ticket #33, and update configure, *am, *in files. * make all clone tools can restore any image which is created by partclone. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@140 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-16 c00jhs00 change updated for 0.0.7-4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@139 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-16 thomas * fix the latest terminal(64*24) size for ncurses * chage the color to partimage style. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@138 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-14 thomas update TUI * set background and font color * set window postition always at center * leave message on stderr when clone fail or success * If you want to use TUI, the latest terminal size should be 64x26 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@137 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-11 c00jhs00 changelog for version 0.0.7-3 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@136 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-07 thomas fix bug for #30 * change to txet mode if terminal color error * change to text mode if terminal width and height too small git-svn-id: svn+ssh://140.110.240.196/partclone_svn@135 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-01 thomas * update progress bar when the terminal not work at color style git-svn-id: svn+ssh://140.110.240.196/partclone_svn@134 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-01 c00jhs00 auto updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@133 93b75dfe-da2d-4241-a08d-2141769abc04 libncursesw5-dev was added for Build-Depends. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@132 93b75dfe-da2d-4241-a08d-2141769abc04 # Use --enable-ncursesw by default. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@131 93b75dfe-da2d-4241-a08d-2141769abc04 2008-05-01 thomas * update version number git-svn-id: svn+ssh://140.110.240.196/partclone_svn@130 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-30 thomas * add more information for dialog git-svn-id: svn+ssh://140.110.240.196/partclone_svn@129 93b75dfe-da2d-4241-a08d-2141769abc04 * update ncurses mode bug git-svn-id: svn+ssh://140.110.240.196/partclone_svn@128 93b75dfe-da2d-4241-a08d-2141769abc04 * update po files * update progress.c for i18n * update partclone.c to fix bug at save stdout with ncurses git-svn-id: svn+ssh://140.110.240.196/partclone_svn@127 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-29 thomas add restore description at gauge git-svn-id: svn+ssh://140.110.240.196/partclone_svn@126 93b75dfe-da2d-4241-a08d-2141769abc04 fix Text User Intereface and add dialog format string. -N --ncurses, Ncurses Interface, but can't save partition data to stdout -X --dialog, output dialog gauge format string, if you want to use dialog mkfifo pipe; (./clone.extfs -d -c -X -s /dev/loop0 2>pipe | cat - > test3_stderr.img) | ./gauge < pipe git-svn-id: svn+ssh://140.110.240.196/partclone_svn@125 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-28 thomas add TUI mode for partclone. * use ncursesw to display text user interface with i18n support * user interface status * user interface progress bar * configure option --enable-ncursesw for TUI mode Using -X or --tui to display text user interface like ex. clone.extfs -d -c -X -s /dev/loop0 -o test.img git-svn-id: svn+ssh://140.110.240.196/partclone_svn@124 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-22 thomas keep fixing TUI mode. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@123 93b75dfe-da2d-4241-a08d-2141769abc04 update FS check, use strcmp to replace memcmp. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@122 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-22 c00jhs00 changelog for version 0.0.6-4. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@121 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-22 thomas add ifdef for tui mode git-svn-id: svn+ssh://140.110.240.196/partclone_svn@120 93b75dfe-da2d-4241-a08d-2141769abc04 fix last change for log_level only. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@119 93b75dfe-da2d-4241-a08d-2141769abc04 update memcmp size. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@118 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-21 thomas update Changelog git-svn-id: svn+ssh://140.110.240.196/partclone_svn@117 93b75dfe-da2d-4241-a08d-2141769abc04 try to add new function for #14 "TUI of status reports" add --enable-ncurses to enable TUI and check libncurses add add new option to use TUI, ex: -X or --tui add function open_tui to open text window close_tui to close window TUI_progress_update to show status The option(TUI) is unstable. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@116 93b75dfe-da2d-4241-a08d-2141769abc04 2008-04-21 jazz git-svn-id: svn+ssh://140.110.240.196/partclone_svn@115 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-21 c00jhs00 Version now is 0.0.6 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@114 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-20 c00jhs00 clone.fat was not compiled. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@113 93b75dfe-da2d-4241-a08d-2141769abc04 updated for 0.0.6-1 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@112 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-18 thomas add manual for clone.fat git-svn-id: svn+ssh://140.110.240.196/partclone_svn@111 93b75dfe-da2d-4241-a08d-2141769abc04 Unstable version. add new filesystem: FAT16/32 add --enable-fat to compile clone.fat. add --enable-all to compile all supported filesystem utilities. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@110 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-16 c00jhs00 changelog updated for 0.0.5-16 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@109 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-12 thomas fix #28, get right partition size when running partition to partition clone. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@108 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-10 c00jhs00 Typo checkinh was fixed as checking. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@107 93b75dfe-da2d-4241-a08d-2141769abc04 2008-02-04 c00jhs00 "," was added between partclone.sf.net and partclone.nchc.org.tw git-svn-id: svn+ssh://140.110.240.196/partclone_svn@106 93b75dfe-da2d-4241-a08d-2141769abc04 version automatically updated by svn. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@105 93b75dfe-da2d-4241-a08d-2141769abc04 # partclone.nchc.org.tw was put without http:// in usage. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@104 93b75dfe-da2d-4241-a08d-2141769abc04 http://partclone.nchc.org.tw was added in usage. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@103 93b75dfe-da2d-4241-a08d-2141769abc04 Update the output messages when clone is finished git-svn-id: svn+ssh://140.110.240.196/partclone_svn@102 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-31 thomas fix about device size use BLKGETSIZE64 to get large partition size fix seek error stop when seek error git-svn-id: svn+ssh://140.110.240.196/partclone_svn@101 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-31 c00jhs00 updated automatically. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@100 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-30 c00jhs00 Changelog updted for 0.0.5-13 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@99 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-30 thomas * reduce seek time * fix number of Ave.Rate * check every filesystem's image_head data... * add new option to disable device and free space checking git-svn-id: svn+ssh://140.110.240.196/partclone_svn@98 93b75dfe-da2d-4241-a08d-2141769abc04 update last fix git-svn-id: svn+ssh://140.110.240.196/partclone_svn@97 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-30 c00jhs00 Changelog updated for 0.0.5-12. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@96 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-30 thomas fix stats info git-svn-id: svn+ssh://140.110.240.196/partclone_svn@95 93b75dfe-da2d-4241-a08d-2141769abc04 try to fix long seeking time problem. not test git-svn-id: svn+ssh://140.110.240.196/partclone_svn@94 93b75dfe-da2d-4241-a08d-2141769abc04 fix a bug at clone hfsp get wrong device size git-svn-id: svn+ssh://140.110.240.196/partclone_svn@93 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-29 c00jhs00 changelog udpated for 0.0.5-11. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@92 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-29 thomas fix bug to get right destination partition size which bigger than 78GB. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@91 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-24 c00jhs00 Format the output: Syncing ...OK -> Syncing... OK Rate:%6.2MB/min -> Rate: %6.2MB/min git-svn-id: svn+ssh://140.110.240.196/partclone_svn@90 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-23 c00jhs00 updated for 0.0.5-10. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@89 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-23 thomas add function to check memory size. function "check_mem" can make sure you have enough memory and report how many size partclone needed if there is no enough size. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@88 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-22 thomas fix real size of MB. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@87 93b75dfe-da2d-4241-a08d-2141769abc04 add function "check_free_space" to make sure the free space is enough to save image file. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@86 93b75dfe-da2d-4241-a08d-2141769abc04 Changeset 84 and 85 * set debug level, set -dX or --debug=X. X = 0 is no debug X = 1 is normal debug X = 2 is large log messgae * update log_mesg for different debug level. * add new function "print_option" to print options and argument at debug=1. * configure --enable-all to enable alll supported file systems. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@85 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-21 thomas update debug message mode but not finish. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@84 93b75dfe-da2d-4241-a08d-2141769abc04 fix #24 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@83 93b75dfe-da2d-4241-a08d-2141769abc04 fix #24, Remove extra space. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@82 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-20 c00jhs00 Updated for 0.0.5-9. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@81 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-16 thomas UNSTALBE feature, support device to device. clone.reiserfs -b -s /dev/sda1 -o /dev/sdb1 clone.reiserfs --dd-mode --source /dev/sda1 --output /dev/sdb1 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@80 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-15 thomas updat atoobox and makefile.am to update ChangeLog every "make dist" automatically. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@79 93b75dfe-da2d-4241-a08d-2141769abc04 add log mesg for bitmap. update svn version string at print_image_ info. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@78 93b75dfe-da2d-4241-a08d-2141769abc04 add new function rescue_sector like ntfsclone to backup bad blocks. clone.ext3 -d -c -R -s /dev/hda1 -o hda1.img clone.ext3 --clone --rescue --source /dev/hda1 --output hda1.img git-svn-id: svn+ssh://140.110.240.196/partclone_svn@77 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-14 thomas add file toolbox, src/version.c for svn version string git-svn-id: svn+ssh://140.110.240.196/partclone_svn@76 93b75dfe-da2d-4241-a08d-2141769abc04 fix svn string git-svn-id: svn+ssh://140.110.240.196/partclone_svn@75 93b75dfe-da2d-4241-a08d-2141769abc04 translation zh-TW.po fix SVN Revision string git-svn-id: svn+ssh://140.110.240.196/partclone_svn@74 93b75dfe-da2d-4241-a08d-2141769abc04 import GNU-Style Changelog from svn. svn2cl --reparagraph --break-before-msg=2 The tool svn2cl is part of subversion-tools. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@73 93b75dfe-da2d-4241-a08d-2141769abc04 check output exist, and add option --overwrite to replace its content. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@72 93b75dfe-da2d-4241-a08d-2141769abc04 add check_mount to check device is mounted or not before clone/restore. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@71 93b75dfe-da2d-4241-a08d-2141769abc04 fix log mesg when clone/restore extfs, too many log message. fix status information format when "clone.xxx | clone.xxx" git-svn-id: svn+ssh://140.110.240.196/partclone_svn@70 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-11 c00jhs00 changelog updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@69 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-10 thomas update #18, add finish message git-svn-id: svn+ssh://140.110.240.196/partclone_svn@68 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-09 c00jhs00 changelog updated for minor changes. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@67 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-09 thomas update #18 again again again... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@66 93b75dfe-da2d-4241-a08d-2141769abc04 add translation for "Remaining" git-svn-id: svn+ssh://140.110.240.196/partclone_svn@65 93b75dfe-da2d-4241-a08d-2141769abc04 update #18, make sure report information ignore seek time. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@64 93b75dfe-da2d-4241-a08d-2141769abc04 fix and test revision git-svn-id: svn+ssh://140.110.240.196/partclone_svn@63 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-09 c00jhs00 changelog updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@62 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-08 thomas update #18, change the status format to Elapsed: 00:00:07, Remained: 00:00:00, Completed: 99.84%, Rate: 287.9MB/min, Total Time : 00:00:09, Ave. Rate: 180.0MB/min, 100.00% completed! git-svn-id: svn+ssh://140.110.240.196/partclone_svn@61 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-08 c00jhs00 changelog updated for ticket #18. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@60 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-08 thomas update #18, change the status format to Elapsed: 00:00:33, Remained: 00:00:00, Completed: 99.74%, Rate: 4.36MB/s Total Time : 00:00:34, 100.00% completed! git-svn-id: svn+ssh://140.110.240.196/partclone_svn@59 93b75dfe-da2d-4241-a08d-2141769abc04 fix #18:Add a saving/restoring rate and estimated time in the status report like this: ..... Used block count: 35192 99.74% completed, Total: 00040 sec., Estimated: 00000 sec., 3.59 MB/s 100.00% completed Syncing ... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@58 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-07 c00jhs00 update changelog for 0.0.5-4 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@57 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-07 thomas fix #15, sync after save/restore. update root-check before open any device or image. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@56 93b75dfe-da2d-4241-a08d-2141769abc04 fux #12, #13 and #17. #13, #17 update as: Partclone v0.0.5 ($Rev: 50 $) http://partclone.sourceforge.net //#17 Starting clone device (/dev/loop0) to image (-) File system: HFS Plus //#13 Device size: 269 MB Space in use: 17 MB Block size: 4096 Byte Used block count: 3976 100.00 percent completed #12, change the error mesg, read from stdin when clone. write to stdout when restore. clone.hfsp -r -s /dev/loop0 Partclone can't restore to stdout. For help,type: clone.hfsplus -h git-svn-id: svn+ssh://140.110.240.196/partclone_svn@55 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-06 c00jhs00 * Static linking was disabled in debian/rules. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@54 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 c00jhs00 updated for 0.0.5-2 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@53 93b75dfe-da2d-4241-a08d-2141769abc04 Description is updated. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@52 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 jazz * motion6 folder is only for showing how `svn import' work. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@51 93b75dfe-da2d-4241-a08d-2141769abc04 * modified src/Makefile.am : [Bugfix] ticket #8 - linking issue of tarbal and dpkg-buildpackage [Note] `make install' will use related path instead of real path * modified src/partclone.c - add SVN Revision message to usage() * modified debian/[control rules] - add project URL and some detail change for debian packaging git-svn-id: svn+ssh://140.110.240.196/partclone_svn@50 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 thomas fix Ticket #11 Unable to run autoreconf in Debian etch git-svn-id: svn+ssh://140.110.240.196/partclone_svn@49 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 jazz * change release version from 0.0.4 to 0.0.5 * [bugfix] reopen and cloes ticket #8 - modified Makefile.am to fix linking permission problem while using `dpkg-buildpackage -rfakeroot' git-svn-id: svn+ssh://140.110.240.196/partclone_svn@48 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 thomas fix link problem. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@47 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 c00jhs00 updated for new release. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@46 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-04 thomas fix Ticket #8, making install partclone, those symbolic link files can be automatically linked. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@45 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-03 jazz * Initial veriosn of motion6 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@44 93b75dfe-da2d-4241-a08d-2141769abc04 * clean up repositories of tags and branches which created by cvs2svn git-svn-id: svn+ssh://140.110.240.196/partclone_svn@43 93b75dfe-da2d-4241-a08d-2141769abc04 * change repository name from trunk to partclone git-svn-id: svn+ssh://140.110.240.196/partclone_svn@42 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-03 thomas add print version information at --help. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@41 93b75dfe-da2d-4241-a08d-2141769abc04 check stdin/stdout User can't clone from stdin or restore to stdout. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@40 93b75dfe-da2d-4241-a08d-2141769abc04 add image version control. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@39 93b75dfe-da2d-4241-a08d-2141769abc04 add crc check function to avoid data I/O error. reference libcrc which mainatined by Lammert Bies 1999-2007 http://www.lammertbies.nl/comm/info/nl_crc-calculation.html git-svn-id: svn+ssh://140.110.240.196/partclone_svn@38 93b75dfe-da2d-4241-a08d-2141769abc04 add default source is -/stdin. default target is -/stdout. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@37 93b75dfe-da2d-4241-a08d-2141769abc04 fix the ticke about "The better informatio at clone/restore" git-svn-id: svn+ssh://140.110.240.196/partclone_svn@36 93b75dfe-da2d-4241-a08d-2141769abc04 update zh_tw.gmo git-svn-id: svn+ssh://140.110.240.196/partclone_svn@35 93b75dfe-da2d-4241-a08d-2141769abc04 Change Image metadata format! add filesystem information in image_head add buff[4096] in image_head for use in the future. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@34 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-02 jazz * These template files is not necessary for current packaging usage. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@33 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-02 thomas add infoclone.c to print Image file information. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@32 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-02 jazz * modified debian/[control, changelog, rules] - to build debian package with static linking binary as default * update src/Makefile.in - if user did not install automake and autoconf then Makefile.am will not update Makefile.in automatically, so we put it in the version control repository. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@31 93b75dfe-da2d-4241-a08d-2141769abc04 * [BUGFIX][BUG #1] fixed linking time error while enabling support of xfs. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@30 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-02 thomas add function check_size to check dest partition size. make sure the size is enough. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@29 93b75dfe-da2d-4241-a08d-2141769abc04 fix a bug in partclone.c. to make sure it return the I/O size. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@28 93b75dfe-da2d-4241-a08d-2141769abc04 check I/O syncronization while using pipe and stdin I use read_all and write_all to replace read and write. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@27 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-02 jazz add ToDo List: I/O syncronization git-svn-id: svn+ssh://140.110.240.196/partclone_svn@26 93b75dfe-da2d-4241-a08d-2141769abc04 add ToDo list: checksum git-svn-id: svn+ssh://140.110.240.196/partclone_svn@25 93b75dfe-da2d-4241-a08d-2141769abc04 update ToDo List: new bug #1 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@24 93b75dfe-da2d-4241-a08d-2141769abc04 add ToDo List git-svn-id: svn+ssh://140.110.240.196/partclone_svn@23 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-02 thomas add more information about the size, xxx MB, xxx Byte... update zh_tw.po git-svn-id: svn+ssh://140.110.240.196/partclone_svn@22 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-01 c00jhs00 ... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@21 93b75dfe-da2d-4241-a08d-2141769abc04 add % for status report. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@20 93b75dfe-da2d-4241-a08d-2141769abc04 ... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@19 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-01 jazz * fix pipe syncronization problem - reference from ntfsclone.c io_all() function git-svn-id: svn+ssh://140.110.240.196/partclone_svn@18 93b75dfe-da2d-4241-a08d-2141769abc04 2008-01-01 c00jhs00 ... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@17 93b75dfe-da2d-4241-a08d-2141769abc04 Update the descriptions in help. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@16 93b75dfe-da2d-4241-a08d-2141769abc04 2007-12-31 jazz * modified configure.ac and src/Makefile.am to add support to compile static linking programs * Makefile.in, configure and src/Makefile.in are modified by autoreconf git-svn-id: svn+ssh://140.110.240.196/partclone_svn@15 93b75dfe-da2d-4241-a08d-2141769abc04 2007-12-31 c00jhs00 spec for rpm package. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@14 93b75dfe-da2d-4241-a08d-2141769abc04 2007-12-31 jazz testing http://free.nchc.org.tw/cvs2rss.php git-svn-id: svn+ssh://140.110.240.196/partclone_svn@13 93b75dfe-da2d-4241-a08d-2141769abc04 2007-12-13 thomas dd files for debian git-svn-id: svn+ssh://140.110.240.196/partclone_svn@12 93b75dfe-da2d-4241-a08d-2141769abc04 add debian for make debian package git-svn-id: svn+ssh://140.110.240.196/partclone_svn@11 93b75dfe-da2d-4241-a08d-2141769abc04 2007-12-10 c00jhs00 ... git-svn-id: svn+ssh://140.110.240.196/partclone_svn@10 93b75dfe-da2d-4241-a08d-2141769abc04 2007-11-26 thomas fix stdout/stdin bug git-svn-id: svn+ssh://140.110.240.196/partclone_svn@9 93b75dfe-da2d-4241-a08d-2141769abc04 fix no --debug error make partclone always open log file git-svn-id: svn+ssh://140.110.240.196/partclone_svn@8 93b75dfe-da2d-4241-a08d-2141769abc04 fix large file support and hfsp get free bitmap error git-svn-id: svn+ssh://140.110.240.196/partclone_svn@7 93b75dfe-da2d-4241-a08d-2141769abc04 default not enable reiserfs, until progsreiserfs can get from debian git-svn-id: svn+ssh://140.110.240.196/partclone_svn@6 93b75dfe-da2d-4241-a08d-2141769abc04 2007-11-25 (no author) <(no author)@93b75dfe-da2d-4241-a08d-2141769abc04> This commit was manufactured by cvs2svn to create tag 'r_0_1'. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@5 93b75dfe-da2d-4241-a08d-2141769abc04 2007-11-25 thomas initial partclone 2007 git-svn-id: svn+ssh://140.110.240.196/partclone_svn@4 93b75dfe-da2d-4241-a08d-2141769abc04 2007-11-25 (no author) <(no author)@93b75dfe-da2d-4241-a08d-2141769abc04> This commit was manufactured by cvs2svn to create branch 'thomas'. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@3 93b75dfe-da2d-4241-a08d-2141769abc04 2007-11-25 thomas Initial revision git-svn-id: svn+ssh://140.110.240.196/partclone_svn@2 93b75dfe-da2d-4241-a08d-2141769abc04 2007-11-25 (no author) <(no author)@93b75dfe-da2d-4241-a08d-2141769abc04> New repository initialized by cvs2svn. git-svn-id: svn+ssh://140.110.240.196/partclone_svn@1 93b75dfe-da2d-4241-a08d-2141769abc04 partclone-0.2.51/INSTALL000066400000000000000000000000341200565264100146150ustar00rootroot00000000000000please access partclone.org partclone-0.2.51/Makefile.am000066400000000000000000000003251200565264100156230ustar00rootroot00000000000000SUBDIRS= po src docs ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = m4/ChangeLog config.rpath toolbox src/deplib_version.c src/version.h src/ufs debian ChangeLog: FORCE srcdir=. $(SHELL) ./toolbox --update-log FORCE: partclone-0.2.51/Makefile.in000066400000000000000000000542421200565264100156430ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS TODO compile config.guess config.rpath config.sub \ depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ 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@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RM = @RM@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = po src docs ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = m4/ChangeLog config.rpath toolbox src/deplib_version.c src/version.h src/ufs debian all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-hdr distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am ChangeLog: FORCE srcdir=. $(SHELL) ./toolbox --update-log FORCE: # 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. .NOEXPORT: partclone-0.2.51/NEWS000066400000000000000000000000431200565264100142630ustar00rootroot00000000000000pleace access http://partclone.org partclone-0.2.51/README000066400000000000000000000015331200565264100144510ustar00rootroot00000000000000Partclone is a project similar to the well-known backup utility "Partition Image" a.k.a partimage. Partclone provides utilities to back up and restore used-blocks of a partition and it is designed for higher compatibility of the file system by using existing library, e.g. e2fslibs is used to read and write the ext2 partition. Partclone now supports ext2, ext3, ext4, hfs+, reiserfs, reiser4, btrfs, vmfs3, vmfs5, xfs, jfs, ufs, ntfs, fat(12/16/32), exfat... We made some utilies: * partclone.ext2, partclone.ext3, partclone.extfs * partclone.ext4 * partclone.reiserfs * partclone.reiser4 * partclone.xfs * partclone.exfat * partclone.fat * partclone.ntfs * partclone.hfsp * partclone.vmfs * partclone.ufs * partclone.jfs * partclone.info * partclone.restore * partclone.chkimg ... For more info about partclone, check our website http://partclone.org. partclone-0.2.51/README.Packages/000077500000000000000000000000001200565264100162415ustar00rootroot00000000000000partclone-0.2.51/README.Packages/changelog000066400000000000000000000520371200565264100201220ustar00rootroot00000000000000partclone (0.2.35) UNRELEASED; urgency=low * [[[insert-git-dch-commit-message-here]]] -- Thomas Tsai Tue, 01 Nov 2011 14:31:03 +0800 partclone (0.2.34) sid; urgency=low * update autoconf and automake for squeeze -- Thomas Tsai Tue, 01 Nov 2011 11:32:42 +0800 partclone (0.2.33) sid; urgency=low * update makefile for ncurses static linking * update memory usage * update ncurses progress bar -- Thomas Tsai Thu, 27 Oct 2011 22:05:17 +0800 partclone (0.2.32) sid; urgency=low * accept patch file from Rommer. * Attached patch for partclone 0.2.31 reduces memory usage by 4-8 times. by Rommer. -- Thomas Tsai Wed, 12 Oct 2011 21:27:43 +0800 partclone (0.2.31) sid; urgency=low * update for vmfs5 -- Thomas Tsai Wed, 12 Oct 2011 21:27:43 +0800 partclone (0.2.30) sid; urgency=low * patch for new vmfs-tools -- Thomas Tsai Tue, 11 Oct 2011 21:21:24 +0800 partclone (0.2.29) sid; urgency=low * fix bugs * release 0.2.29 -- Thomas Tsai Mon, 12 Sep 2011 21:21:24 +0800 partclone (0.2.28) sid; urgency=low * update e2fslibs for squeeze * fix bug for ntfsclone with ncurses on sid -- Thomas Tsai Thu, 08 Sep 2011 22:58:27 +0800 partclone (0.2.27) sid; urgency=low * accept patch from Georges about configure, fixIntTypes and typos in manpages * try to fix issue for bitmap, suggestion from Paul. -- Thomas Tsai Tue, 30 Aug 2011 11:45:06 +0800 partclone (0.2.26) sid; urgency=low * update test script -- Thomas Tsai Mon, 15 Aug 2011 10:45:06 +0800 partclone (0.2.25) unstable; urgency=low * update for e2fslibs 1.42~WIP-2011-07-02 * compact ntfs and ntfs-3g -- Thomas Tsai Mon, 15 Aug 2011 10:45:06 +0800 partclone (0.2.24) natty; urgency=low * accept patch from Ian Abbott. * '--domain' (-D) and -offset_domain=X to generate domain file for ddrescue. -- Thomas Tsai Tue, 24 May 2011 10:45:06 +0800 partclone (0.2.23) maverick; urgency=low * update manpages -- Thomas Tsai Fri, 22 Apr 2011 11:02:59 +0800 partclone (0.2.22) maverick; urgency=low * typo error for progress -- Thomas Tsai Mon, 28 Mar 2011 15:19:16 +0800 partclone (0.2.21) maverick; urgency=low * fix bug for partclone.dd and partclone.restore for stdin dd data. -- Thomas Tsai Tue, 22 Mar 2011 14:21:11 +0800 partclone (0.2.20) maverick; urgency=low * fix dd issue. set default size as target size for stdin data. -- Thomas Tsai Mon, 14 Mar 2011 10:12:19 +0800 partclone (0.2.19) unstable; urgency=low * update makefile for btrf -- Thomas Tsai Wed, 09 Mar 2011 14:06:05 +0800 partclone (0.2.18) unstable; urgency=low * add option max_block_cache to get better performance escpcially small block size(fat) * update typo error -- Thomas Tsai Tue, 25 Jan 2011 16:06:05 +0800 partclone (0.2.17) unstable; urgency=low * update for ext4 metadata mismatch issue * update makefile and configure -- Thomas Tsai Tue, 25 Jan 2011 16:06:05 +0800 partclone (0.2.16) unstable; urgency=low * add option --quiet to disable progress bar * add option --restore_row_file to create special file for mounting with loop option -- Thomas Tsai Wed, 06 Oct 2010 16:06:05 +0800 partclone (0.2.15) unstable; urgency=low * Bug fixed: btrfs clone fail, lost some metadata message * Add po: add fr_FR po file from Cédric, very thanks. -- Thomas Tsai Wed, 01 Sep 2010 10:25:48 +0800 partclone (0.2.14) unstable; urgency=low * add btrfs support -- Thomas Tsai Sun, 22 Aug 2010 15:14:20 +0800 partclone (0.2.13) unstable; urgency=low * add link partclone.VMFS_volume_member * fix bug: jfsclone segfault * add debian/control pkg-config -- Thomas Tsai Wed, 28 Jul 2010 17:14:20 +0800 partclone (0.2.12) unstable; urgency=low * New Feature: The jfs filesystem is supported. -- Thomas Tsai Wed, 30 Jun 2010 11:58:41 +0800 partclone (0.2.11) unstable; urgency=low * Bug fixed: xfsclone type error for amd64 * Update control file: add libvmfs -- Thomas Tsai Wed, 19 May 2010 12:22:07 +0800 partclone (0.2.10) unstable; urgency=low * Bug fixed: chkimg.c not work * Bug fixed: new xfsclone -- Thomas Tsai Wed, 19 May 2010 12:22:07 +0800 partclone (0.2.9) unstable; urgency=low * Bug fixed: error for backup partition larger than 8.7T * Bug fixed: better memory usage for restore -- Thomas Tsai Thu, 29 Apr 2010 15:22:07 +0800 partclone (0.2.8) unstable; urgency=low * Bug fixed: update progress bar faster -- Thomas Tsai Mon, 29 Mar 2010 16:22:38 +0800 partclone (0.2.7-1) unstable; urgency=low * fix progress bug about: alwayn new line for 640x480 resolution * update version -- Thomas Tsai Tue, 16 Mar 2010 15:13:04 +0800 partclone (0.2.6-1) unstable; urgency=low * update version -- Thomas Tsai Mon, 15 Mar 2010 11:29:18 +0800 partclone (0.2.5-1) unstable; urgency=low * A bug about 0 rate for bitmap calculation. * update partclone to show more readable size for partition and rate/min. -- Thomas Tsai Fri, 12 Mar 2010 09:15:31 +0800 partclone (0.2.4-1) unstable; urgency=low * autogen git number * fix progress inf bug -- Thomas Tsai Wed, 10 Mar 2010 16:30:55 +0800 partclone (0.2.3-1) unstable; urgency=low * add partclone.fstype to test filesystem type (vmfs only) * update svn versionto git version -- Thomas Tsai Tue, 02 Mar 2010 13:50:26 +0800 partclone (0.2.0-2) unstable; urgency=low * VMFS supported in this release. -- Steven Shiau Sun, 14 Feb 2010 15:00:00 +0800 partclone (0.2.0-1) unstable; urgency=low [ Yu-Chin Tsai ] * A test release. -- Thomas Tsai Wed, 06 Jan 2010 16:07:05 +0800 partclone (0.1.9-5) unstable; urgency=low [ Yu-Chin Tsai ] * A bug about hfsplus error for 2 or more extents was fixed. -- Steven Shiau Wed, 25 Nov 2009 16:54:00 +0800 partclone (0.1.9-4) unstable; urgency=low * update configure.ac, set ufs as default enabled file system. * update progress bar to show the "100%" in the end. -- Yu-Chin Tsai Mon, 16 Nov 2009 14:46:04 +0800 partclone (0.1.9-3) unstable; urgency=low [ Yu-Chin Tsai ] * An option to ignore CRC checking was added. -- Steven Shiau Tue, 03 Nov 2009 17:16:00 +0800 partclone (0.1.9-2) unstable; urgency=low [ Yu-Chin Tsai ] * Bug fixed: update log message and open fail message for ufsclone. Thanks to dswartz for testing ufs backup and report. -- Steven Shiau Fri, 09 Oct 2009 11:14:00 +0800 partclone (0.1.9-1) unstable; urgency=low [ Yu-Chin Tsai ] * Bug fixed: XFS clone failure was fixed. * UFS was added. -- Yu-Chin Tsai Thu, 17 Sep 2009 14:07:33 +0800 partclone (0.1.1-16) unstable; urgency=low [Thomas Tsai] * Bug fixed: FAT clone failure was fixed. -- Steven Shiau Sun, 09 Aug 2009 08:49:00 +0800 partclone (0.1.1-15) unstable; urgency=low [Thomas Tsai] * Bug fixed: Wrong path for exec files. -- Steven Shiau Wed, 24 Jun 2009 16:48:00 +0800 partclone (0.1.1-14) unstable; urgency=low [Thomas Tsai] * Bug fixed: version number from SVN was not shown correctly. -- Steven Shiau Wed, 24 Jun 2009 14:36:00 +0800 partclone (0.1.1-13) unstable; urgency=low [Thomas Tsai] * Prompt messages were updated. -- Steven Shiau Fri, 18 Jun 2009 13:30:00 +0800 partclone (0.1.1-12) unstable; urgency=low [Thomas Tsai] * An option was added: --logfile or -L to specify file for log message. * A new program partclone.chkimg was added to help checking img by CRC. -- Steven Shiau Wed, 17 Jun 2009 10:34:00 +0800 partclone (0.1.1-11) unstable; urgency=low [Thomas Tsai] * update clear_buf * The patch from Kristian Erik Hermansen. fix progress.c:152- SECURITY: fprintf call should have "%s" as argument 1 -- Steven Shiau Sat, 13 Jun 2009 14:39:00 +0800 partclone (0.1.1-10) unstable; urgency=low [Thomas Tsai] * Bug fixed: pointer problem was fixed. * Bug fixed: buffer overflow problem was fixed. Thanks to Kristian Erik Hermansen and Piavlo. * Bug fixed: a bug about hfs+ was fixed. -- Steven Shiau Wed, 10 Jun 2009 10:39:00 +0800 partclone (0.1.1-9) unstable; urgency=low [Steven Shiau] * Some output messages were polished again. -- Steven Shiau Tue, 02 Jun 2009 18:09:00 +0800 partclone (0.1.1-8) unstable; urgency=low [Thomas Tsai] * Some output messages were polished. -- Steven Shiau Tue, 02 Jun 2009 16:51:00 +0800 partclone (0.1.1-7) unstable; urgency=low [Thomas Tsai] * Bug fixed: Progress update with nogui, "Calculating bitmap..." was added without option -d. -- Steven Shiau Mon, 01 Jun 2009 22:36:00 +0800 partclone (0.1.1-6) unstable; urgency=low [Thomas Tsai] * bug of CRC in 64 bit image problem was fixed. A better method will be imlemented in the nexe version of image format. -- Steven Shiau Sat, 30 May 2009 12:10:00 +0800 partclone (0.1.1-5) unstable; urgency=low [Thomas Tsai] * bug of time calculating was fixed. -- Steven Shiau Wed, 27 May 2009 22:13:00 +0800 partclone (0.1.1-4) unstable; urgency=low [Thomas Tsai] * Update default RES from 10000 to 1000. -- Steven Shiau Wed, 27 May 2009 12:59:00 +0800 partclone (0.1.1-3) unstable; urgency=low [Thomas Tsai] * Bug fixed: block device should not have to use "--overwrite". -- Steven Shiau Wed, 27 May 2009 11:23:00 +0800 partclone (0.1.1-2) unstable; urgency=low [Thomas Tsai] * partclone.ntfsreloc is linked to partclone.ntfsfixboot. -- Steven Shiau Fri, 22 May 2009 13:52:00 +0800 partclone (0.1.1-1) unstable; urgency=low [Thomas Tsai] * Minor updates for output messages. * New Feature: add argument to set fresh of progress bar * New Feature: restore to new file(non-block device) * A bug about crc check in 64bit image * Update partclone.ntfsreloc to ntfsfixboot.c from http://cc.jct.ac.il/~shaneh/ntfsfixboot.c -- root Fri, 22 May 2009 05:52:00 +0800 partclone (0.1.0-10) unstable; urgency=low [ Thomas Tsai ] * Bug fixed: clonezilla-Bugs-2784676. Thanks to njorl _at_ users sourceforge net. -- Steven Shiau Fri, 01 May 2009 10:55:00 +0800 partclone (0.1.0-9) unstable; urgency=low [ Steven Shiau ] * Minor updates for output messages. -- Steven Shiau Sun, 26 Apr 2009 13:54:00 +0800 partclone (0.1.0-8) unstable; urgency=low [ Steven Shiau ] * Minor updates for output messages. [ Thomas Tsai ] * EXECNAME was added for partclone.restore. -- Steven Shiau Fri, 24 Apr 2009 14:07:00 +0800 partclone (0.1.0-7) unstable; urgency=low [ Thomas Tsai ] * partclone.ext4dev is linkded now. -- Steven Shiau Thu, 23 Apr 2009 19:01:00 +0800 partclone (0.1.0-6) unstable; urgency=low [ Thomas Tsai ] * A bug about partclone.restore used to restore known file systems was fixed. -- Steven Shiau Thu, 18 Apr 2009 09:59:00 +0800 partclone (0.1.0-5) unstable; urgency=low [ Thomas Tsai ] * A bug about checking partition size was fixed. -- Steven Shiau Thu, 16 Apr 2009 15:03:00 +0800 partclone (0.1.0-4) unstable; urgency=low [ Thomas Tsai ] * Local device to device copy mode option "-b, --dd-mode" was changed to be "-b, --dev-to-dev" * A bug about partclone.dd wrongly get the partition size was fixed. -- Steven Shiau Thu, 16 Apr 2009 12:16:00 +0800 partclone (0.1.0-3) unstable; urgency=low [ Thomas Tsai ] * Bug fixed: partclone.ntfs statistics data was wrong when doing partition to partition clone. -- Steven Shiau Tue, 15 Apr 2009 10:52:00 +0800 partclone (0.1.0-2) unstable; urgency=low [ Steven Shiau ] * --enable-static is on again. -- Steven Shiau Tue, 10 Apr 2009 11:47:00 +0800 partclone (0.1.0-1) unstable; urgency=low [ Thomas Tsai ] * partclone.ext4, partclone.dd, partclone.restore were added. -- Steven Shiau Tue, 07 Apr 2009 15:01:00 +0800 partclone (0.0.9-4) unstable; urgency=low [ Thomas Tsai ] * A bug about FAT12 was fixed. -- Steven Shiau Tue, 30 Dec 2008 13:41:00 +0800 partclone (0.0.9-3) unstable; urgency=low [ Steven Shiau ] * New upstream ntfsreloc.c 0.8. -- Steven Shiau Thu, 25 Dec 2008 15:32:00 +0800 partclone (0.0.9-2) unstable; urgency=low [ Thomas Tsai ] * Update dirty message for ntfsclone-ng. * Check filesystem before cloning partition. Partclone will make sure that. * Add check hfs_plus filesystem before cloning volume. * Update fatclone.c fatclone.h clearly. update dirty message for extfs. -- Steven Shiau Mon, 22 Dec 2008 09:46:00 +0800 partclone (0.0.9-1) unstable; urgency=low # New features: partclone.ntfsreloc and partclone.ntfs were added. -- Steven Shiau Thu, 30 Oct 2008 10:51:00 +0800 partclone (0.0.8-8) unstable; urgency=low # Bug fixed: Failing to restore fat32 image was fixed by Thomas Tsai. -- Steven Shiau Wed, 30 Jul 2008 09:18:00 +0800 partclone (0.0.8-7) unstable; urgency=low # partclone.hfsplus link was added by Thomas Tsai. -- Steven Shiau Thu, 24 Jul 2008 11:53:00 +0800 partclone (0.0.8-6) unstable; urgency=low # Bug fixed: partclone.fat12 link was not done. -- Steven Shiau Fri, 11 Jul 2008 16:11:00 +0800 partclone (0.0.8-5) unstable; urgency=low # fat12 was added by Thomas Tsai. -- Steven Shiau Fri, 11 Jul 2008 15:03:00 +0800 partclone (0.0.8-4) unstable; urgency=low # Enable static linking. -- Steven Shiau Sat, 28 Jun 2008 10:22:00 +0800 partclone (0.0.8-3) unstable; urgency=low # Some minor updates about messages by Thomas Tsai. -- Steven Shiau Sun, 15 Jun 2008 22:48:00 +0800 partclone (0.0.8-2) unstable; urgency=low # configure.ac updated by Thomas Tsai. # partclone website is www.partclone.org now. -- Steven Shiau Mon, 26 May 2008 14:19:00 +0800 partclone (0.0.8-1) unstable; urgency=low # clone.$FS was renamed as partclone.$FS by Thomas Tsai. -- Steven Shiau Sun, 25 May 2008 09:19:00 +0800 partclone (0.0.7-4) unstable; urgency=low # Some bugs about ncursesw were fixed by Thomas Tsai. -- Steven Shiau Fri, 16 May 2008 16:18:00 +0800 partclone (0.0.7-3) unstable; urgency=low # Some bugs about ncursesw were fixed by Thomas Tsai. -- Steven Shiau Thu, 06 May 2008 23:00:00 +0800 partclone (0.0.7-2) unstable; urgency=low # Use --enable-ncursesw by default. -- Steven Shiau Thu, 01 May 2008 11:13:00 +0800 partclone (0.0.7-1) unstable; urgency=low # New functions: TUI mode for output done by Thomas Tsai. -- Steven Shiau Thu, 01 May 2008 11:08:00 +0800 partclone (0.0.6-4) unstable; urgency=low # Some new function for #14 "TUI of status reports" from Thomas Tsai. # Smaller FS_MAGIC_SIZE in main.c. -- Steven Shiau Tue, 22 Apr 2008 14:52:00 +0800 partclone (0.0.6-3) unstable; urgency=low # Bug fixed: version was not changed. -- Steven Shiau Thu, 21 Feb 2008 13:40:00 +0800 partclone (0.0.6-2) unstable; urgency=low # Bug fixed: clone.fat was not complied. -- Steven Shiau Wed, 20 Feb 2008 22:47:00 +0800 partclone (0.0.6-1) unstable; urgency=low # clone.fat was added by Thomas Tsai. -- Steven Shiau Wed, 20 Feb 2008 22:41:00 +0800 partclone (0.0.5-16) unstable; urgency=low # Typos fixed. # Bug fixed: partition to partition clone size checking failed. -- Steven Shiau Sat, 16 Feb 2008 10:02:00 +0800 partclone (0.0.5-15) unstable; urgency=low # partclone.nchc.org.tw was put without http:// in usage. -- Steven Shiau Mon, 04 Feb 2008 13:47:00 +0800 partclone (0.0.5-14) unstable; urgency=low # Some minor bugs fixed by Thomas Tsai. # http://partclone.nchc.org.tw was added in usage. -- Steven Shiau Mon, 04 Feb 2008 13:45:00 +0800 partclone (0.0.5-13) unstable; urgency=low * Bugs fixed and feature added by Thomas Tsai: # reduce seek time # fix number of Ave.Rate # check every filesystem's image_head data... # add new option to disable device and free space checking -- Steven Shiau Tue, 30 Jan 2008 23:07:00 +0800 partclone (0.0.5-12) unstable; urgency=low * Bug fixed by Thomas Tsai: Partition size checking failed in some cases. -- Steven Shiau Tue, 30 Jan 2008 21:08:00 +0800 partclone (0.0.5-11) unstable; urgency=low * Bug fixed by Thomas Tsai: Partition size checking failed -- Steven Shiau Tue, 29 Jan 2008 16:47:00 +0800 partclone (0.0.5-10) unstable; urgency=low * Functions to check memory size, check_free_space were added by Thomas Tsai. -- Steven Shiau Wed, 23 Jan 2008 22:57:00 +0800 partclone (0.0.5-9) unstable; urgency=low * Thomas Tsai added: New function rescue_sector. UNSTALBE feature, support device to device. Some other minor changes. -- Steven Shiau Sun, 20 Jan 2008 14:15:00 +0800 partclone (0.0.5-8) unstable; urgency=low * Some minor changes on ticket #18 from Thomas Tsai. -- Steven Shiau Fri, 11 Jan 2008 09:24:00 +0800 partclone (0.0.5-7) unstable; urgency=low * Some minor changes. -- Steven Shiau Wed, 9 Jan 2008 22:45:00 +0800 partclone (0.0.5-6) unstable; urgency=low * Thomas Tsai enhanced the status report. -- Steven Shiau Wed, 9 Jan 2008 09:15:00 +0800 partclone (0.0.5-5) unstable; urgency=low * Thomas Tsai closed ticket #18: Add a saving/restoring rate and estimated time to finish job in the status report. -- Steven Shiau Sun, 8 Jan 2008 15:12:00 +0800 partclone (0.0.5-4) unstable; urgency=low * Thomas Tsai closed these tickets: #12: Command without any option should show only short help messages. #13: Change "HFSPLUS" as "HFS+" or "HFS Plus". #15 (Sync after image is restored). #17: Show program name "partclone" and version number and url in the status report. -- Steven Shiau Sun, 7 Jan 2008 17:05:00 +0800 partclone (0.0.5-3) unstable; urgency=low * Static linking was disabled in debian/rules. -- Steven Shiau Sun, 6 Jan 2008 16:34:00 +0800 partclone (0.0.5-2) unstable; urgency=low * Description for deb package was updated. -- Steven Shiau Fri, 4 Jan 2008 21:40:00 +0800 partclone (0.0.5-1) unstable; urgency=low * [bugfix] reopen and close ticket #8 - fix debian packaging linking permission issue. -- Jazz Yao-Tsung Wang Fri, 4 Jan 2008 11:54:14 +0800 partclone (0.0.4-5) unstable; urgency=low * close ticket #8. Thomas added some alias programs when making install. -- Steven Shiau Fri, 4 Jan 2008 11:12:00 +0800 partclone (0.0.4-3ubuntu1) feisty; urgency=low * add support of static linking to configure.ac and src/Makefile.am * [BUGFIX #1] fixed static linking time error while enabling XFS file system support. * modified debian packaginf control and rules to fix some mistakes. -- Jazz Yao-Tsung Wang Wed, 2 Jan 2008 21:23:52 +0800 partclone (0.0.4-3) unstable; urgency=low * A Bug about restoring image from stdin was fixed by Jazz Wang. * zh_TW.po was updated. -- Steven Shiau Sun, 1 Jan 2008 20:20:00 +0800 partclone (0.0.4-2) unstable; urgency=low * Updated config by Jazz Wang so that static linking now it's better. Not finished. * Help messages updated. -- Steven Shiau Sun, 1 Jan 2008 11:20:00 +0800 partclone (0.0.4-1) unstable; urgency=low * Initial release. * modify rules -- Yu-Chin Tsai Thu, 13 Dec 2007 10:48:03 +0800 partclone-0.2.51/README.Packages/debian.sid/000077500000000000000000000000001200565264100202415ustar00rootroot00000000000000partclone-0.2.51/README.Packages/debian.sid/compat000066400000000000000000000000021200565264100214370ustar00rootroot000000000000005 partclone-0.2.51/README.Packages/debian.sid/control000066400000000000000000000023401200565264100216430ustar00rootroot00000000000000Source: partclone Section: admin Priority: extra Maintainer: Yu-Chin Tsai Build-Depends: debhelper (>= 5), autotools-dev, e2fslibs-dev (>= 1.41.3), xfslibs-dev, libreiserfs0.3-dev, libreiser4-dev, libufs2 (>= 7.2), libbsd-dev, libncursesw5-dev, ntfs-3g-dev|libntfs-dev, libvmfs (>= 0.2.5), libjfs-dev, pkg-config, libtinfo-dev, xsltproc, docbook-xsl Standards-Version: 3.7.2 Package: partclone Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: The utility to clone and restore a partition. Partclone is a project like the well-known backup utility "Partition Image" a.k.a partimage. . Partclone provides utilities to back up used blocks and design for higher compatibility of the file system using supported library like e2fslibs. . check the project website for more details http://partclone.org Package: partclone-dbg Section: debug Priority: extra Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: The utility to clone and restore a partition. Partclone is a project like the well-known backup utility "Partition Image" a.k.a partimage. . This package contains the debugging symbols. . check the project website for more details http://partclone.org partclone-0.2.51/README.Packages/debian.sid/copyright000066400000000000000000000024711200565264100222000ustar00rootroot00000000000000This package was debianized by Yu-Chin Tsai on Thu, 13 Dec 2007 09:51:06 +0800. It was downloaded from Upstream Author(s): Thomas Tsai Jazz Wang Copyright: Copyright (C) 2006, 2007 by Jazz Wang (jazz _at_ nchc org tw) Thomas Tsai (thomas _at_ nchc org tw) License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is (C) 2007, Yu-Chin Tsai and is licensed under the GPL, see above. partclone-0.2.51/README.Packages/debian.sid/dirs000066400000000000000000000000111200565264100211150ustar00rootroot00000000000000usr/sbin partclone-0.2.51/README.Packages/debian.sid/docs000066400000000000000000000000141200565264100211070ustar00rootroot00000000000000NEWS README partclone-0.2.51/README.Packages/debian.sid/rules000077500000000000000000000050631200565264100213250ustar00rootroot00000000000000#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: configure dh_testdir # Add here commands to configure the package. ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" --enable-ncursesw --enable-all --enable-static build: build-stamp build-stamp: config.status dh_testdir # Add here commands to compile the package. $(MAKE) #docbook-to-man debian/partclone.sgml > partclone.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. -$(MAKE) dist clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/partclone. $(MAKE) DESTDIR=$(CURDIR)/debian/partclone install # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installexamples # dh_install # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip --dbg-package=partclone-dbg dh_compress dh_fixperms # dh_perl # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install partclone-0.2.51/README.Packages/debian.squeeze/000077500000000000000000000000001200565264100211435ustar00rootroot00000000000000partclone-0.2.51/README.Packages/debian.squeeze/compat000066400000000000000000000000021200565264100223410ustar00rootroot000000000000005 partclone-0.2.51/README.Packages/debian.squeeze/control000066400000000000000000000023721200565264100225520ustar00rootroot00000000000000Source: partclone Section: admin Priority: extra Maintainer: Yu-Chin Tsai , Jazz Yao-Tsung Wang Build-Depends: debhelper (>= 5), autotools-dev, e2fslibs-dev (>= 1.41.3), xfslibs-dev, libreiserfs0.3-dev, libreiser4-dev, libufs2 (>= 7.2), libbsd-dev, libncursesw5-dev, ntfs-3g-dev|libntfs-dev, libvmfs (>= 0.2.5), libjfs-dev, pkg-config, xsltproc, docbook-xsl Standards-Version: 3.7.2 Package: partclone Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: The utility to clone and restore a partition. Partclone is a project like the well-known backup utility "Partition Image" a.k.a partimage. . Partclone provides utilities to back up used blocks and design for higher compatibility of the file system using supported library like e2fslibs. . check the project website for more details http://partclone.org Package: partclone-dbg Section: debug Priority: extra Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: The utility to clone and restore a partition. Partclone is a project like the well-known backup utility "Partition Image" a.k.a partimage. . This package contains the debugging symbols. . check the project website for more details http://partclone.org partclone-0.2.51/README.Packages/debian.squeeze/copyright000066400000000000000000000024711200565264100231020ustar00rootroot00000000000000This package was debianized by Yu-Chin Tsai on Thu, 13 Dec 2007 09:51:06 +0800. It was downloaded from Upstream Author(s): Thomas Tsai Jazz Wang Copyright: Copyright (C) 2006, 2007 by Jazz Wang (jazz _at_ nchc org tw) Thomas Tsai (thomas _at_ nchc org tw) License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is (C) 2007, Yu-Chin Tsai and is licensed under the GPL, see above. partclone-0.2.51/README.Packages/debian.squeeze/dirs000066400000000000000000000000111200565264100220170ustar00rootroot00000000000000usr/sbin partclone-0.2.51/README.Packages/debian.squeeze/docs000066400000000000000000000000141200565264100220110ustar00rootroot00000000000000NEWS README partclone-0.2.51/README.Packages/debian.squeeze/rules000077500000000000000000000050631200565264100222270ustar00rootroot00000000000000#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: configure dh_testdir # Add here commands to configure the package. ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" --enable-ncursesw --enable-all --enable-static build: build-stamp build-stamp: config.status dh_testdir # Add here commands to compile the package. $(MAKE) #docbook-to-man debian/partclone.sgml > partclone.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. -$(MAKE) dist clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/partclone. $(MAKE) DESTDIR=$(CURDIR)/debian/partclone install # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installexamples # dh_install # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_python # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip --dbg-package=partclone-dbg dh_compress dh_fixperms # dh_perl # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install partclone-0.2.51/README.Packages/partclone.spec000066400000000000000000000066151200565264100211140ustar00rootroot00000000000000Name: partclone Version: 0.1.0 Release: 10 Group: System/Filesystems URL: http://partclone.org License: GPL Summary: File System Clone Utilities for ext2/3/4, reiserfs, reiser4, xfs, hfs+ File System Source0: http://free.nchc.org.tw/drbl-core/pool/drbl/unstable/p/partclone/%{name}_%{version}-%{release}.tar.gz BuildRequires: e2fsprogs-devel >= 1.41.3, libprogsreiserfs-devel-static, reiser4progs, xfsprogs-devel, ntfsprogs-devel, ncurses-static BuildRoot: %{_tmppath}/%{name}-build %description A set of file system clone utilities, including ext2/3, reiserfs, reiser4, xfs, hfs+ file system Authors: -------- Thomas Tsai Jazz Wang http://partclone.org, http://partclone.nchc.org.tw %prep %setup -q -n %{name} %build [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT ./configure --prefix=/usr --enable-all --enable-static --enable-ncursesw LIBS=-ltinfo make -j4 %install make DESTDIR=$RPM_BUILD_ROOT install %post %postun ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog NEWS README TODO %doc %{_mandir}/man?/* %{_sbindir}/* /usr/share/locale/* %changelog * Fri May 01 2009 - Steven Shiau 0.1.0-10 - New upstream 0.1.0-10. * Sun Apr 26 2009 - Steven Shiau 0.1.0-9 - New upstream 0.1.0-9. * Fri Apr 24 2009 - Steven Shiau 0.1.0-8 - New upstream 0.1.0-8. * Thu Apr 23 2009 - Steven Shiau 0.1.0-7 - New upstream 0.1.0-7. * Tue Apr 21 2009 - Steven Shiau 0.1.0-6 - New upstream 0.1.0-6. * Fri Apr 17 2009 - Steven Shiau 0.1.0-5 - New upstream 0.1.0-5. * Tue Apr 14 2009 - thomas _at_ nchc.org.tw 0.1.0-2 - update configure for FC10 * Sun Apr 12 2009 - Steven Shiau 0.1.0-2 - New upstream 0.1.0. * Tue Dec 30 2008 - Steven Shiau 0.0.9-4 - A bug about FAT12 was fixed by Thomas Tsai. * Wed Dec 25 2008 - Steven Shiau 0.0.9-3 - New upstream 0.0.9-3. * Mon Dec 22 2008 - Steven Shiau 0.0.9-2 - New upstream 0.0.9-2. * Sun Jun 16 2008 - Steven Shiau 0.0.8-3 - New upstream 0.0.8-3. * Mon May 26 2008 - Steven Shiau 0.0.8-2 - New upstream 0.0.8-2. * Sun May 25 2008 - Steven Shiau 0.0.8-1 - New upstream 0.0.8-1. * Thu Feb 21 2008 - Steven Shiau 0.0.6-3 - Bug fixed: clone.fat was not compiled. * Thu Feb 21 2008 - Steven Shiau 0.0.6-1 - New upstream 0.0.6-1. * Sat Feb 16 2008 - Steven Shiau 0.0.5-16 - New upstream 0.0.5-16. * Mon Feb 04 2008 - Steven Shiau 0.0.5-15 - New upstream 0.0.5-15. * Thu Jan 24 2008 - Steven Shiau 0.0.5-10 - New upstream 0.0.5-10. * Fri Jan 04 2008 - Steven Shiau 0.0.5-1 - New upstream 0.0.5-1. * Thu Jan 03 2008 - Steven Shiau 0.0.4-4 - Sync the version number with Debian package. - Enable static linking. * Mon Dec 31 2007 - Steven Shiau 0.0.1-2 - Some doc and debian rules were added by Thomas Tsai. * Mon Dec 10 2007 - Steven Shiau 0.0.1-1 - Initial release for partclone. partclone-0.2.51/TODO000066400000000000000000000003731200565264100142620ustar00rootroot00000000000000* multuthread * multi output device for restore * nilfs support * exfat support * wbfs support * zfs support * source code update * add exfat version test * add exfat in web page and partclone.xml... * update test restore_row_file to restore-raw-file partclone-0.2.51/aclocal.m4000066400000000000000000001170401200565264100154320ustar00rootroot00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file 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. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file 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. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file 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. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) partclone-0.2.51/compile000066400000000000000000000000001200565264100151300ustar00rootroot00000000000000partclone-0.2.51/config.guess000077500000000000000000001275341200565264100161230ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: partclone-0.2.51/config.h.in000066400000000000000000000064671200565264100156270ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* "define e2fs version" */ #undef EXTFS_1_41 /* "define e2fs version" */ #undef EXTFS_VERSION /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_EXT2FS_EXT2FS_H /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `ncursesw' library (-lncursesw). */ #undef HAVE_LIBNCURSESW /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H /* Define to 1 if you have the header file. */ #undef HAVE_NTFS_3G_MISC_H /* Define to 1 if you have the header file. */ #undef HAVE_NTFS_VERSION_H /* Define to 1 if you have the header file. */ #undef HAVE_REISER4_LIBREISER4_H /* Define to 1 if you have the header file. */ #undef HAVE_REISERFS_REISERFS_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_XFS_LIBXFS_H /* "define ntfs version" */ #undef NTFS_VERSION /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* "define reiser4 version" */ #undef REISER4_VERSION /* "define reiserfs version" */ #undef REISERFS_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES partclone-0.2.51/config.rpath000077500000000000000000000374441200565264100161130ustar00rootroot00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | kfreebsd*-gnu | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; kfreebsd*-gnu) ;; freebsd* | dragonfly*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; interix3*) ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; knetbsd*-gnu) ;; netbsd*) ;; newsos6) ;; nto-qnx*) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.3*) ;; sysv4*MP*) ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: partclone-0.2.51/configure000077500000000000000000011135601200565264100155050ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for Partclone 0.2.51. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and thomas@nchc.org.tw $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Partclone' PACKAGE_TARNAME='partclone' PACKAGE_VERSION='0.2.51' PACKAGE_STRING='Partclone 0.2.51' PACKAGE_BUGREPORT='thomas@nchc.org.tw' PACKAGE_URL='' gt_needs= # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS ENABLE_MEMTRACE_FALSE ENABLE_MEMTRACE_TRUE ENABLE_TINFO_FALSE ENABLE_TINFO_TRUE ENABLE_STATIC_FALSE ENABLE_STATIC_TRUE ENABLE_NCURSESW_FALSE ENABLE_NCURSESW_TRUE ENABLE_BTRFS_FALSE ENABLE_BTRFS_TRUE ENABLE_JFS_FALSE ENABLE_JFS_TRUE ENABLE_VMFS_FALSE ENABLE_VMFS_TRUE ENABLE_UFS_FALSE ENABLE_UFS_TRUE ENABLE_NTFS_FALSE ENABLE_NTFS_TRUE ENABLE_NTFS_PROGS_FALSE ENABLE_NTFS_PROGS_TRUE ENABLE_NTFS_3G_FALSE ENABLE_NTFS_3G_TRUE ENABLE_EXFAT_FALSE ENABLE_EXFAT_TRUE ENABLE_FAT_FALSE ENABLE_FAT_TRUE ENABLE_HFSP_FALSE ENABLE_HFSP_TRUE ENABLE_REISER4_FALSE ENABLE_REISER4_TRUE ENABLE_REISERFS_FALSE ENABLE_REISERFS_TRUE ENABLE_XFS_FALSE ENABLE_XFS_TRUE EGREP GREP CPP ENABLE_EXTFS_FALSE ENABLE_EXTFS_TRUE UUID_LIBS UUID_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG ENABLE_ALL_FALSE ENABLE_ALL_TRUE LN_S RM POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT USE_NLS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_nls enable_dependency_tracking with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix enable_largefile enable_all enable_extfs enable_xfs enable_reiserfs enable_reiser4 enable_hfsp enable_fat enable_exfat enable_ntfs enable_ufs enable_vmfs enable_jfs enable_btrfs enable_ncursesw enable_static enable_mtrace ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR UUID_CFLAGS UUID_LIBS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Partclone 0.2.51 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/partclone] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Partclone 0.2.51:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-nls do not use Native Language Support --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-rpath do not hardcode runtime library paths --disable-largefile omit support for large files --enable-all enable all supported file system --enable-extfs enable ext2/3/4 file system --enable-xfs enable XFS file system --enable-reiserfs enable REISERFS 3.6/3.6 file system --enable-reiser4 enable Reiser4 file system --enable-hfsp enable HFS plus file system --enable-fat enable FAT file system --enable-exfat enable EXFAT file system --enable-ntfs enable NTFS file system --enable-ufs enable UFS(1/2) file system --enable-vmfs enable vmfs file system --enable-jfs enable jfs file system --enable-btrfs enable btrfs file system --enable-ncursesw enable TEXT User Interface --enable-static enable static linking --enable-mtrace enable memory tracing Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path UUID_CFLAGS C compiler flags for UUID, overriding pkg-config UUID_LIBS linker flags for UUID, overriding pkg-config CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Partclone configure 0.2.51 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------- ## ## Report this to thomas@nchc.org.tw ## ## --------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Partclone $as_me 0.2.51, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #AC_CONFIG_AUX_DIR([build-aux]) #AC CONFIG SRCDIR([src/main.c]) am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='partclone' VERSION='0.2.51' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBINTL= LTLIBINTL= INCINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RM+:} false; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Enable large file support. # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi # default value## supported_fs="" ##enable-all## # Check whether --enable-all was given. if test "${enable_all+set}" = set; then : enableval=$enable_all; enable_all=yes fi if test "$enable_all" = yes; then ENABLE_ALL_TRUE= ENABLE_ALL_FALSE='#' else ENABLE_ALL_TRUE='#' ENABLE_ALL_FALSE= fi if test "$enable_all" = "yes"; then enable_xfs="yes" enable_extfs="yes" enable_reiserfs="yes" enable_reiser4="yes" enable_hfsp="yes" enable_fat="yes" enable_exfat="yes" enable_ntfs="yes" enable_ufs="yes" enable_vmfs="yes" enable_jfs="yes" enable_btrfs="yes" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5 $as_echo_n "checking for UUID... " >&6; } if test -n "$UUID_CFLAGS"; then pkg_cv_UUID_CFLAGS="$UUID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$UUID_LIBS"; then pkg_cv_UUID_LIBS="$UUID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UUID_LIBS=`$PKG_CONFIG --libs "uuid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then UUID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "uuid" 2>&1` else UUID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "uuid" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$UUID_PKG_ERRORS" >&5 exit elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } exit else UUID_CFLAGS=$pkg_cv_UUID_CFLAGS UUID_LIBS=$pkg_cv_UUID_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi uuidcfg=`pkg-config --cflags --libs uuid` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else as_fn_error $? "*** pthread library (libpthread) not found" "$LINENO" 5 fi ##ext2/3## # Check whether --enable-extfs was given. if test "${enable_extfs+set}" = set; then : enableval=$enable_extfs; enable_extfs=yes else enable_extfs=no fi if test "$enable_extfs" = yes; then ENABLE_EXTFS_TRUE= ENABLE_EXTFS_FALSE='#' else ENABLE_EXTFS_TRUE='#' ENABLE_EXTFS_FALSE= fi if test "$enable_extfs" = "yes"; then #check library of some filesystems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXT2/3 Library and Header files ... ..." >&5 $as_echo "$as_me: checking for EXT2/3 Library and Header files ... ..." >&6;} ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in ext2fs/ext2fs.h do : ac_fn_c_check_header_mongrel "$LINENO" "ext2fs/ext2fs.h" "ac_cv_header_ext2fs_ext2fs_h" "$ac_includes_default" if test "x$ac_cv_header_ext2fs_ext2fs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EXT2FS_EXT2FS_H 1 _ACEOF else as_fn_error $? "*** EXT2/3 header files (ext2fs/ext2fs.h) not found" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ext2fs_initialize in -lext2fs" >&5 $as_echo_n "checking for ext2fs_initialize in -lext2fs... " >&6; } if ${ac_cv_lib_ext2fs_ext2fs_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lext2fs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ext2fs_initialize (); int main () { return ext2fs_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ext2fs_ext2fs_initialize=yes else ac_cv_lib_ext2fs_ext2fs_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ext2fs_ext2fs_initialize" >&5 $as_echo "$ac_cv_lib_ext2fs_ext2fs_initialize" >&6; } if test "x$ac_cv_lib_ext2fs_ext2fs_initialize" = xyes; then : true else as_fn_error $? "*** EXT2/3 library (libext2fs) not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of libextfs" >&5 $as_echo_n "checking version of libextfs... " >&6; } extfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lext2fs -DEXTFS` extfs_version=`$srcdir/get_lib_version extfs` extfs_version=`$srcdir/get_lib_version extfs | cut -d'.' -f1` extfs_version_major=`$srcdir/get_lib_version extfs | cut -d'.' -f2` extfs_version_minor=`$srcdir/get_lib_version extfs | cut -d'.' -f3` cat >>confdefs.h <<_ACEOF #define EXTFS_VERSION "${extfs_version}.${extfs_version_major}" _ACEOF if test -z "$extfs_version"; then extfs_version="?" extfs_version_major="?" extfs_version_minor="?" extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $extfs_version" >&5 $as_echo "$extfs_version" >&6; } as_fn_error $? "Please check your libextfs!" "$LINENO" 5 fi if test $extfs_version -lt 1 ; then extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $extfs_version" >&5 $as_echo "$extfs_version" >&6; } as_fn_error $? "Please upgrade your libextfs to 1.41 or newer version!" "$LINENO" 5 elif test $extfs_version -ge 1 -a $extfs_version_major -lt 41 ; then extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $extfs_version" >&5 $as_echo "$extfs_version" >&6; } as_fn_error $? "Please upgrade your libextfs to 1.42 or newer version!" "$LINENO" 5 elif test $extfs_version -ge 1 -a $extfs_version_major -lt 42 ; then extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; suggest you upgrade the library!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $extfs_version" >&5 $as_echo "$extfs_version" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Suggest upgrade your libextfs to 1.42 or newer version!" >&5 $as_echo "$as_me: WARNING: Suggest upgrade your libextfs to 1.42 or newer version!" >&2;} cat >>confdefs.h <<_ACEOF #define EXTFS_1_41 "1" _ACEOF else extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; ok!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $extfs_version" >&5 $as_echo "$extfs_version" >&6; } fi supported_fs=$supported_fs" extfs" fi #end of check extfs ##XFS## # Check whether --enable-xfs was given. if test "${enable_xfs+set}" = set; then : enableval=$enable_xfs; enable_xfs=yes else enable_xfs=no fi if test "$enable_xfs" = yes; then ENABLE_XFS_TRUE= ENABLE_XFS_FALSE='#' else ENABLE_XFS_TRUE='#' ENABLE_XFS_FALSE= fi if test "$enable_xfs" = "yes"; then #check library of some filesystems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aio_init in -lrt" >&5 $as_echo_n "checking for aio_init in -lrt... " >&6; } if ${ac_cv_lib_rt_aio_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aio_init (); int main () { return aio_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_aio_init=yes else ac_cv_lib_rt_aio_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_aio_init" >&5 $as_echo "$ac_cv_lib_rt_aio_init" >&6; } if test "x$ac_cv_lib_rt_aio_init" = xyes; then : true else as_fn_error $? "*** runtime library (libc6) not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFS Library and Header files ... ..." >&5 $as_echo "$as_me: checking for XFS Library and Header files ... ..." >&6;} for ac_header in xfs/libxfs.h do : ac_fn_c_check_header_mongrel "$LINENO" "xfs/libxfs.h" "ac_cv_header_xfs_libxfs_h" "$ac_includes_default" if test "x$ac_cv_header_xfs_libxfs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XFS_LIBXFS_H 1 _ACEOF else as_fn_error $? "*** XFS header (libxfs.h) not found" "$LINENO" 5 fi done supported_fs=$supported_fs" xfs" fi xfs_version="version unknown, suggest 3.1.1" #end of check xfs ##reiserfs## # Check whether --enable-reiserfs was given. if test "${enable_reiserfs+set}" = set; then : enableval=$enable_reiserfs; enable_reiserfs=yes else enable_reiserfs=no fi if test "$enable_reiserfs" = yes; then ENABLE_REISERFS_TRUE= ENABLE_REISERFS_FALSE='#' else ENABLE_REISERFS_TRUE='#' ENABLE_REISERFS_FALSE= fi if test "$enable_reiserfs" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Reiserfs Library and Header files ... ..." >&5 $as_echo "$as_me: checking for Reiserfs Library and Header files ... ..." >&6;} for ac_header in reiserfs/reiserfs.h do : ac_fn_c_check_header_mongrel "$LINENO" "reiserfs/reiserfs.h" "ac_cv_header_reiserfs_reiserfs_h" "$ac_includes_default" if test "x$ac_cv_header_reiserfs_reiserfs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_REISERFS_REISERFS_H 1 _ACEOF else as_fn_error $? "*** reiserfs header files (reiserfs/reiserfs.h) not found" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reiserfs_fs_open in -lreiserfs" >&5 $as_echo_n "checking for reiserfs_fs_open in -lreiserfs... " >&6; } if ${ac_cv_lib_reiserfs_reiserfs_fs_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreiserfs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char reiserfs_fs_open (); int main () { return reiserfs_fs_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_reiserfs_reiserfs_fs_open=yes else ac_cv_lib_reiserfs_reiserfs_fs_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_reiserfs_reiserfs_fs_open" >&5 $as_echo "$ac_cv_lib_reiserfs_reiserfs_fs_open" >&6; } if test "x$ac_cv_lib_reiserfs_reiserfs_fs_open" = xyes; then : true else as_fn_error $? "*** Reiserfs library (libreiserfs) not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file_dal_open in -ldal" >&5 $as_echo_n "checking for file_dal_open in -ldal... " >&6; } if ${ac_cv_lib_dal_file_dal_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldal $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char file_dal_open (); int main () { return file_dal_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dal_file_dal_open=yes else ac_cv_lib_dal_file_dal_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dal_file_dal_open" >&5 $as_echo "$ac_cv_lib_dal_file_dal_open" >&6; } if test "x$ac_cv_lib_dal_file_dal_open" = xyes; then : true else as_fn_error $? "*** Reiserfs depend library (libdal) not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of libreiserfs" >&5 $as_echo_n "checking version of libreiserfs... " >&6; } reiserfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lreiserfs -DREISERFS` reiserfs_version=`$srcdir/get_lib_version reiserfs` cat >>confdefs.h <<_ACEOF #define REISERFS_VERSION "${reiserfs_version}" _ACEOF reiserfs_version=`$srcdir/get_lib_version reiserfs | cut -d'.' -f1` reiserfs_version_major=`$srcdir/get_lib_version reiserfs | cut -d'.' -f2` reiserfs_version_minor=`$srcdir/get_lib_version reiserfs | cut -d'.' -f3` reiserfs_version_minor_2=`$srcdir/get_lib_version reiserfs | cut -d'.' -f4` if test -z "$reiserfs_version"; then reiserfs_version="?" reiserfs_version_major="?" reiserfs_version_minor="?" reiserfs_version_minor_2="?" reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiserfs_version" >&5 $as_echo "$reiserfs_version" >&6; } as_fn_error $? "Please check your libreiserfs!" "$LINENO" 5 fi if test $reiserfs_version_major -lt 3 ; then reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiserfs_version" >&5 $as_echo "$reiserfs_version" >&6; } as_fn_error $? "Please upgrade your libreiserfs to 0.3.0.5 or newer version!" "$LINENO" 5 elif test $reiserfs_version_major -ge 3 -a $reiserfs_version_minor_2 -lt 5 ; then reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; suggest you upgrade the library!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiserfs_version" >&5 $as_echo "$reiserfs_version" >&6; } as_fn_error $? "Please upgrade your libreiserfs to 0.3.0.5 or newer version!" "$LINENO" 5 else reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; ok!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiserfs_version" >&5 $as_echo "$reiserfs_version" >&6; } fi supported_fs=$supported_fs" reiserfs" fi #end of check reiserfs ##reiser4## # Check whether --enable-reiser4 was given. if test "${enable_reiser4+set}" = set; then : enableval=$enable_reiser4; enable_reiser4=yes else enable_reiser4=no fi if test "$enable_reiser4" = yes; then ENABLE_REISER4_TRUE= ENABLE_REISER4_FALSE='#' else ENABLE_REISER4_TRUE='#' ENABLE_REISER4_FALSE= fi if test "$enable_reiser4" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Reiser4 Library and Header files ... ..." >&5 $as_echo "$as_me: checking for Reiser4 Library and Header files ... ..." >&6;} for ac_header in reiser4/libreiser4.h do : ac_fn_c_check_header_mongrel "$LINENO" "reiser4/libreiser4.h" "ac_cv_header_reiser4_libreiser4_h" "$ac_includes_default" if test "x$ac_cv_header_reiser4_libreiser4_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_REISER4_LIBREISER4_H 1 _ACEOF else as_fn_error $? "*** reiser4 header files (reiser4/libreiser4.h) not found" "$LINENO" 5 fi done #AC_CHECK_LIB([reiser4 -laal], [reiser4_init], , # AC_MSG_ERROR([*** Reiser4 library (libreiser4) not found])) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aal_device_open in -laal" >&5 $as_echo_n "checking for aal_device_open in -laal... " >&6; } if ${ac_cv_lib_aal_aal_device_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-laal $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aal_device_open (); int main () { return aal_device_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_aal_aal_device_open=yes else ac_cv_lib_aal_aal_device_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aal_aal_device_open" >&5 $as_echo "$ac_cv_lib_aal_aal_device_open" >&6; } if test "x$ac_cv_lib_aal_aal_device_open" = xyes; then : true else as_fn_error $? "*** Reiser4 depend library (libaal) not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of libreiser4" >&5 $as_echo_n "checking version of libreiser4... " >&6; } reiser4_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lreiser4 -laal -DREISER4` reiser4_version=`$srcdir/get_lib_version reiser4` cat >>confdefs.h <<_ACEOF #define REISER4_VERSION "${reiser4_version}" _ACEOF reiser4_version=`$srcdir/get_lib_version reiser4 | cut -d'.' -f1` reiser4_version_major=`$srcdir/get_lib_version reiser4 | cut -d'.' -f2` reiser4_version_minor=`$srcdir/get_lib_version reiser4 | cut -d'.' -f3` if test -z "$reiser4_version"; then reiser4_version="?" reiser4_version_major="?" reiser4_version_minor="?" reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiser4_version" >&5 $as_echo "$reiser4_version" >&6; } as_fn_error $? "Please check your libreiser4!" "$LINENO" 5 fi if test $reiser4_version -lt 1 ; then reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiser4_version" >&5 $as_echo "$reiser4_version" >&6; } as_fn_error $? "Please upgrade your libreiser4 to 1.0.6 or newer version!" "$LINENO" 5 elif test $reiser4_version -ge 1 -a $reiser4_version_minor -lt 6 ; then reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; suggest you upgrade the library!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiser4_version" >&5 $as_echo "$reiser4_version" >&6; } as_fn_error $? "Please upgrade your libreiser4 to 1.0.6 or newer version!" "$LINENO" 5 else reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; ok!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reiser4_version" >&5 $as_echo "$reiser4_version" >&6; } fi supported_fs=$supported_fs" reiser4" fi #end of check reiser4 ##hfs plus## # Check whether --enable-hfsp was given. if test "${enable_hfsp+set}" = set; then : enableval=$enable_hfsp; enable_hfsp=yes else enable_hfsp=no fi if test "$enable_hfsp" = yes; then ENABLE_HFSP_TRUE= ENABLE_HFSP_FALSE='#' else ENABLE_HFSP_TRUE='#' ENABLE_HFSP_FALSE= fi if test "$enable_hfsp" = "yes"; then supported_fs=$supported_fs" hfs-plus" hfs_plus_version="build-in" fi #end of check hfsplus ##fat## # Check whether --enable-fat was given. if test "${enable_fat+set}" = set; then : enableval=$enable_fat; enable_fat=yes else enable_fat=no fi if test "$enable_fat" = yes; then ENABLE_FAT_TRUE= ENABLE_FAT_FALSE='#' else ENABLE_FAT_TRUE='#' ENABLE_FAT_FALSE= fi if test "$enable_fat" = "yes"; then supported_fs=$supported_fs" fat" fat_version="build-in" fi #end of check fat ##exfat## # Check whether --enable-exfat was given. if test "${enable_exfat+set}" = set; then : enableval=$enable_exfat; enable_exfat=yes else enable_exfat=no fi if test "$enable_exfat" = yes; then ENABLE_EXFAT_TRUE= ENABLE_EXFAT_FALSE='#' else ENABLE_EXFAT_TRUE='#' ENABLE_EXFAT_FALSE= fi if test "$enable_exfat" = "yes"; then supported_fs=$supported_fs" exfat" exfat_version="build-in" fi #end of check exfat ##NTFS## # Check whether --enable-ntfs was given. if test "${enable_ntfs+set}" = set; then : enableval=$enable_ntfs; enable_ntfs=yes else enable_ntfs=no fi if test "$enable_ntfs" = "yes"; then ntfs_3g_h=0 ntfs_3g_l=0 ntfsprogs_h=0 ntfsprogs_l=0 #check library of some filesystems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NTFS-3g Library and Header files ... ..." >&5 $as_echo "$as_me: checking for NTFS-3g Library and Header files ... ..." >&6;} for ac_header in ntfs-3g/misc.h do : ac_fn_c_check_header_mongrel "$LINENO" "ntfs-3g/misc.h" "ac_cv_header_ntfs_3g_misc_h" "$ac_includes_default" if test "x$ac_cv_header_ntfs_3g_misc_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NTFS_3G_MISC_H 1 _ACEOF ntfs_3g_h=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** NTFS(libntfs-3g-dev) header not found" >&5 $as_echo "$as_me: WARNING: *** NTFS(libntfs-3g-dev) header not found" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ntfs_mount in -lntfs-3g" >&5 $as_echo_n "checking for ntfs_mount in -lntfs-3g... " >&6; } if ${ac_cv_lib_ntfs_3g_ntfs_mount+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lntfs-3g $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ntfs_mount (); int main () { return ntfs_mount (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ntfs_3g_ntfs_mount=yes else ac_cv_lib_ntfs_3g_ntfs_mount=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ntfs_3g_ntfs_mount" >&5 $as_echo "$ac_cv_lib_ntfs_3g_ntfs_mount" >&6; } if test "x$ac_cv_lib_ntfs_3g_ntfs_mount" = xyes; then : ntfs_3g_l=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** ntfs depend library (libntfs-3g) not found" >&5 $as_echo "$as_me: WARNING: *** ntfs depend library (libntfs-3g) not found" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NTFS Library and Header files ... ..." >&5 $as_echo "$as_me: checking for NTFS Library and Header files ... ..." >&6;} for ac_header in ntfs/version.h do : ac_fn_c_check_header_mongrel "$LINENO" "ntfs/version.h" "ac_cv_header_ntfs_version_h" "$ac_includes_default" if test "x$ac_cv_header_ntfs_version_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NTFS_VERSION_H 1 _ACEOF ntfsprogs_h=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** NTFS(ntfsprogs) header not found" >&5 $as_echo "$as_me: WARNING: *** NTFS(ntfsprogs) header not found" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ntfs_mount in -lntfs" >&5 $as_echo_n "checking for ntfs_mount in -lntfs... " >&6; } if ${ac_cv_lib_ntfs_ntfs_mount+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lntfs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ntfs_mount (); int main () { return ntfs_mount (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ntfs_ntfs_mount=yes else ac_cv_lib_ntfs_ntfs_mount=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ntfs_ntfs_mount" >&5 $as_echo "$ac_cv_lib_ntfs_ntfs_mount" >&6; } if test "x$ac_cv_lib_ntfs_ntfs_mount" = xyes; then : ntfsprogs_l=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** ntfsprogs library (libntfs) not found" >&5 $as_echo "$as_me: WARNING: *** ntfsprogs library (libntfs) not found" >&2;} fi fi if test "$ntfs_3g_l" = 1; then ENABLE_NTFS_3G_TRUE= ENABLE_NTFS_3G_FALSE='#' else ENABLE_NTFS_3G_TRUE='#' ENABLE_NTFS_3G_FALSE= fi if test "$ntfsprogs_l" = 1; then ENABLE_NTFS_PROGS_TRUE= ENABLE_NTFS_PROGS_FALSE='#' else ENABLE_NTFS_PROGS_TRUE='#' ENABLE_NTFS_PROGS_FALSE= fi if test "$ntfsprogs_l" = 1 -o "$ntfs_3g_l" = 1; then ENABLE_NTFS_TRUE= ENABLE_NTFS_FALSE='#' else ENABLE_NTFS_TRUE='#' ENABLE_NTFS_FALSE= fi define_ntfs_version="ntfs-3g" if test "$ntfs_3g_h" = 1 -a "$ntfs_3g_l" = 1; then supported_fs=$supported_fs" ntfs" ntfs_version="ntfs-3g" cat >>confdefs.h <<_ACEOF #define NTFS_VERSION "${ntfs_version}" _ACEOF elif test "$ntfsprogs_h" = 1 -a "$ntfsprogs_l" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of libntfs" >&5 $as_echo_n "checking version of libntfs... " >&6; } ntfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lntfs -DNTFS` ntfs_version=`$srcdir/get_lib_version ntfs` cat >>confdefs.h <<_ACEOF #define NTFS_VERSION "${ntfs_version}" _ACEOF ntfs_version=`$srcdir/get_lib_version ntfs | cut -d':' -f1` ntfs_version_major=`$srcdir/get_lib_version ntfs | cut -d':' -f2` ntfs_version_minor=`$srcdir/get_lib_version ntfs | cut -d':' -f3` if test -z "$ntfs_version"; then ntfs_version="?" ntfs_version_major="?" ntfs_version_minor="?" ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntfs_version" >&5 $as_echo "$ntfs_version" >&6; } as_fn_error $? "Please check your libntfs!" "$LINENO" 5 fi if test "$ntfs_version" -lt 9 ; then ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; bad" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntfs_version" >&5 $as_echo "$ntfs_version" >&6; } as_fn_error $? "Please upgrade your libntfs to 9:0:0 or newer version!" "$LINENO" 5 elif test "$ntfs_version" -eq 9 ; then ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; suggest you upgrade the library!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntfs_version" >&5 $as_echo "$ntfs_version" >&6; } else ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; ok!" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntfs_version" >&5 $as_echo "$ntfs_version" >&6; } supported_fs=$supported_fs" ntfs" fi define_ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor" else if test "$enable_ntfs" = "yes"; then as_fn_error $? "Can't find ntfs library!" "$LINENO" 5 fi fi #end of check ntfs ##UFS## # Check whether --enable-ufs was given. if test "${enable_ufs+set}" = set; then : enableval=$enable_ufs; enable_ufs=yes else enable_ufs=no fi if test "$enable_ufs" = yes; then ENABLE_UFS_TRUE= ENABLE_UFS_FALSE='#' else ENABLE_UFS_TRUE='#' ENABLE_UFS_FALSE= fi if test "$enable_ufs" = "yes"; then #check library of some filesystems { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UFS Library ... ..." >&5 $as_echo "$as_me: checking for UFS Library ... ..." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ufs_disk_fillout in -lufs" >&5 $as_echo_n "checking for ufs_disk_fillout in -lufs... " >&6; } if ${ac_cv_lib_ufs_ufs_disk_fillout+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lufs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ufs_disk_fillout (); int main () { return ufs_disk_fillout (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ufs_ufs_disk_fillout=yes else ac_cv_lib_ufs_ufs_disk_fillout=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ufs_ufs_disk_fillout" >&5 $as_echo "$ac_cv_lib_ufs_ufs_disk_fillout" >&6; } if test "x$ac_cv_lib_ufs_ufs_disk_fillout" = xyes; then : true else as_fn_error $? "*** ufs depend library (libufs2) not found" "$LINENO" 5 fi supported_fs=$supported_fs" ufs" ufs_version="unknown, suggest 7.0-2" fi #end of check ufs ##VMFS## # Check whether --enable-vmfs was given. if test "${enable_vmfs+set}" = set; then : enableval=$enable_vmfs; enable_vmfs=yes else enable_vmfs=no fi if test "$enable_vmfs" = yes; then ENABLE_VMFS_TRUE= ENABLE_VMFS_FALSE='#' else ENABLE_VMFS_TRUE='#' ENABLE_VMFS_FALSE= fi if test "$enable_vmfs" = "yes"; then #check library of some filesystems ##AC_CHECKING([ for VMFS Library and Header files ... ]) ##AC_CHECK_HEADERS([uuid/uuid.h vmfs/vmfs.h], , ## AC_MSG_ERROR([*** VMFS(vmfs-tools) header not found])) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VMFS Library files ... ..." >&5 $as_echo "$as_me: checking for VMFS Library files ... ..." >&6;} as_ac_Lib=`$as_echo "ac_cv_lib_vmfs -luuid''_vmfs_host_init" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vmfs_host_init in -lvmfs -luuid" >&5 $as_echo_n "checking for vmfs_host_init in -lvmfs -luuid... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lvmfs -luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char vmfs_host_init (); int main () { return vmfs_host_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : true else as_fn_error $? "*** vmfs depend library (libvmfs) not found" "$LINENO" 5 fi supported_fs=$supported_fs" vmfs" vmfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lvmfs -DVMFS $uuidcfg` vmfs_version=`$srcdir/get_lib_version vmfs` fi #end of check vmfs ##JFS## # Check whether --enable-jfs was given. if test "${enable_jfs+set}" = set; then : enableval=$enable_jfs; enable_jfs=yes else enable_jfs=no fi if test "$enable_jfs" = yes; then ENABLE_JFS_TRUE= ENABLE_JFS_FALSE='#' else ENABLE_JFS_TRUE='#' ENABLE_JFS_FALSE= fi if test "$enable_jfs" = "yes"; then #check library of some filesystems ##AC_CHECKING([ for JFS Library and Header files ... ]) ##AC_CHECK_HEADERS([uuid/uuid.h jfs/jfs_superblock.h], , ## AC_MSG_ERROR([*** JFS(libjfs) header not found])) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JFS Library files ... ..." >&5 $as_echo "$as_me: checking for JFS Library files ... ..." >&6;} as_ac_Lib=`$as_echo "ac_cv_lib_jfs -luuid''_ujfs_get_superblk" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ujfs_get_superblk in -ljfs -luuid" >&5 $as_echo_n "checking for ujfs_get_superblk in -ljfs -luuid... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljfs -luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ujfs_get_superblk (); int main () { return ujfs_get_superblk (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : true else as_fn_error $? "*** jfs depend library (libjfs) not found" "$LINENO" 5 fi supported_fs=$supported_fs" jfs" jfs_version="version unknown, suggest 1.1.12" fi #end of check jfs ##btrfs## # Check whether --enable-btrfs was given. if test "${enable_btrfs+set}" = set; then : enableval=$enable_btrfs; enable_btrfs=yes else enable_btrfs=no fi if test "$enable_btrfs" = yes; then ENABLE_BTRFS_TRUE= ENABLE_BTRFS_FALSE='#' else ENABLE_BTRFS_TRUE='#' ENABLE_BTRFS_FALSE= fi if test "$enable_btrfs" = yes; then supported_fs=$supported_fs" btrfs" btrfs_version="0.19" fi #end of check btrfs ##libncursesw## # Check whether --enable-ncursesw was given. if test "${enable_ncursesw+set}" = set; then : enableval=$enable_ncursesw; enable_ncursesw=yes fi if test "$enable_ncursesw" = yes; then ENABLE_NCURSESW_TRUE= ENABLE_NCURSESW_FALSE='#' else ENABLE_NCURSESW_TRUE='#' ENABLE_NCURSESW_FALSE= fi if test "$enable_ncursesw" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ncursesw Library and Header files ... ..." >&5 $as_echo "$as_me: checking for Ncursesw Library and Header files ... ..." >&6;} for ac_header in ncurses.h do : ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" if test "x$ac_cv_header_ncurses_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NCURSES_H 1 _ACEOF else as_fn_error $? "*** ncurses header files (ncurses.h) not found" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5 $as_echo_n "checking for initscr in -lncursesw... " >&6; } if ${ac_cv_lib_ncursesw_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncursesw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ncursesw_initscr=yes else ac_cv_lib_ncursesw_initscr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5 $as_echo "$ac_cv_lib_ncursesw_initscr" >&6; } if test "x$ac_cv_lib_ncursesw_initscr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNCURSESW 1 _ACEOF LIBS="-lncursesw $LIBS" else as_fn_error $? "*** Ncursesw library (libncursesw5) not found" "$LINENO" 5 fi fi ##static linking## # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; enable_static=yes fi if test "$enable_static" = yes; then ENABLE_STATIC_TRUE= ENABLE_STATIC_FALSE='#' else ENABLE_STATIC_TRUE='#' ENABLE_STATIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -ltinfo" >&5 $as_echo_n "checking for initscr in -ltinfo... " >&6; } if ${ac_cv_lib_tinfo_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tinfo_initscr=yes else ac_cv_lib_tinfo_initscr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_initscr" >&5 $as_echo "$ac_cv_lib_tinfo_initscr" >&6; } if test "x$ac_cv_lib_tinfo_initscr" = xyes; then : tinfo=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** tinfo library (libtinfo) not found" >&5 $as_echo "$as_me: WARNING: *** tinfo library (libtinfo) not found" >&2;} fi if test "$tinfo" = 1; then ENABLE_TINFO_TRUE= ENABLE_TINFO_FALSE='#' else ENABLE_TINFO_TRUE='#' ENABLE_TINFO_FALSE= fi ##memory tracing## # Check whether --enable-mtrace was given. if test "${enable_mtrace+set}" = set; then : enableval=$enable_mtrace; enable_memtrace=yes fi if test "$enable_memtrace" = yes; then ENABLE_MEMTRACE_TRUE= ENABLE_MEMTRACE_FALSE='#' else ENABLE_MEMTRACE_TRUE='#' ENABLE_MEMTRACE_FALSE= fi ac_config_headers="$ac_config_headers config.h" ac_config_files="$ac_config_files Makefile src/Makefile po/Makefile.in docs/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_ALL_TRUE}" && test -z "${ENABLE_ALL_FALSE}"; then as_fn_error $? "conditional \"ENABLE_ALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_EXTFS_TRUE}" && test -z "${ENABLE_EXTFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_EXTFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_XFS_TRUE}" && test -z "${ENABLE_XFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_XFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_REISERFS_TRUE}" && test -z "${ENABLE_REISERFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_REISERFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_REISER4_TRUE}" && test -z "${ENABLE_REISER4_FALSE}"; then as_fn_error $? "conditional \"ENABLE_REISER4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_HFSP_TRUE}" && test -z "${ENABLE_HFSP_FALSE}"; then as_fn_error $? "conditional \"ENABLE_HFSP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FAT_TRUE}" && test -z "${ENABLE_FAT_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_EXFAT_TRUE}" && test -z "${ENABLE_EXFAT_FALSE}"; then as_fn_error $? "conditional \"ENABLE_EXFAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_NTFS_3G_TRUE}" && test -z "${ENABLE_NTFS_3G_FALSE}"; then as_fn_error $? "conditional \"ENABLE_NTFS_3G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_NTFS_PROGS_TRUE}" && test -z "${ENABLE_NTFS_PROGS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_NTFS_PROGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_NTFS_TRUE}" && test -z "${ENABLE_NTFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_NTFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_UFS_TRUE}" && test -z "${ENABLE_UFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_UFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_VMFS_TRUE}" && test -z "${ENABLE_VMFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_VMFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_JFS_TRUE}" && test -z "${ENABLE_JFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_JFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_BTRFS_TRUE}" && test -z "${ENABLE_BTRFS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_BTRFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_NCURSESW_TRUE}" && test -z "${ENABLE_NCURSESW_FALSE}"; then as_fn_error $? "conditional \"ENABLE_NCURSESW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_TINFO_TRUE}" && test -z "${ENABLE_TINFO_FALSE}"; then as_fn_error $? "conditional \"ENABLE_TINFO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_MEMTRACE_TRUE}" && test -z "${ENABLE_MEMTRACE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_MEMTRACE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Partclone $as_me 0.2.51, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Partclone config.status 0.2.51 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" echo "Support File System:" echo "ext2/3/4...... $enable_extfs, $extfs_version" echo "reiserfs...... $enable_reiserfs, $reiserfs_version" echo "reiser4....... $enable_reiser4, $reiser4_version" echo "xfs........... $enable_xfs, $xfs_version" echo "ntfs.......... $enable_ntfs, $ntfs_version" echo "fat12/16/32... $enable_fat, $fat_version" echo "exfat......... $enable_exfat, $exfat_version" echo "hfs plus...... $enable_hfsp, $hfs_plus_version" echo "ufs .......... $enable_ufs, $ufs_version" echo "vmfs ......... $enable_vmfs, $vmfs_version" echo "jfs .......... $enable_jfs, $jfs_version" echo "btrfs......... $enable_btrfs, $btrfs_version" #echo $supported_fs partclone-0.2.51/configure.ac000066400000000000000000000406061200565264100160630ustar00rootroot00000000000000AC_INIT([Partclone], [0.2.51], [thomas@nchc.org.tw]) #AC_CONFIG_AUX_DIR([build-aux]) #AC CONFIG SRCDIR([src/main.c]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AM_GNU_GETTEXT_VERSION([0.16.1]) AM_GNU_GETTEXT([external]) AC_PROG_CC AC_PROG_INSTALL AC_PATH_PROG(RM, rm, rm) AC_PROG_LN_S # Enable large file support. AC_SYS_LARGEFILE # default value## supported_fs="" ##enable-all## AC_ARG_ENABLE(all, AS_HELP_STRING(--enable-all,enable all supported file system), enable_all=yes, ) AM_CONDITIONAL(ENABLE_ALL, test "$enable_all" = yes) if test "$enable_all" = "yes"; then enable_xfs="yes" enable_extfs="yes" enable_reiserfs="yes" enable_reiser4="yes" enable_hfsp="yes" enable_fat="yes" enable_exfat="yes" enable_ntfs="yes" enable_ufs="yes" enable_vmfs="yes" enable_jfs="yes" enable_btrfs="yes" fi dnl Check for uuid PKG_CHECK_MODULES(UUID, uuid,,exit) uuidcfg=`pkg-config --cflags --libs uuid` AC_CHECK_LIB([pthread], [pthread_create], [], AC_MSG_ERROR([*** pthread library (libpthread) not found])) ##ext2/3## AC_ARG_ENABLE(extfs, AS_HELP_STRING(--enable-extfs,enable ext2/3/4 file system), enable_extfs=yes, enable_extfs=no ) AM_CONDITIONAL(ENABLE_EXTFS, test "$enable_extfs" = yes) if test "$enable_extfs" = "yes"; then #check library of some filesystems dnl Check for EXT2/3 AC_CHECKING([ for EXT2/3 Library and Header files ... ]) AC_CHECK_HEADERS([ext2fs/ext2fs.h], , AC_MSG_ERROR([*** EXT2/3 header files (ext2fs/ext2fs.h) not found]) ) AC_CHECK_LIB([ext2fs], [ext2fs_initialize], true, AC_MSG_ERROR([*** EXT2/3 library (libext2fs) not found])) AC_MSG_CHECKING(version of libextfs) extfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lext2fs -DEXTFS` extfs_version=`$srcdir/get_lib_version extfs` extfs_version=`$srcdir/get_lib_version extfs | cut -d'.' -f1` extfs_version_major=`$srcdir/get_lib_version extfs | cut -d'.' -f2` extfs_version_minor=`$srcdir/get_lib_version extfs | cut -d'.' -f3` AC_DEFINE_UNQUOTED([EXTFS_VERSION], "${extfs_version}.${extfs_version_major}", ["define e2fs version"]) if test -z "$extfs_version"; then extfs_version="?" extfs_version_major="?" extfs_version_minor="?" extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; bad" AC_MSG_RESULT($extfs_version) AC_MSG_ERROR(Please check your libextfs!) fi if test $extfs_version -lt 1 ; then extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; bad" AC_MSG_RESULT($extfs_version) AC_MSG_ERROR(Please upgrade your libextfs to 1.41 or newer version!) elif test $extfs_version -ge 1 -a $extfs_version_major -lt 41 ; then extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; bad" AC_MSG_RESULT($extfs_version) AC_MSG_ERROR(Please upgrade your libextfs to 1.42 or newer version!) elif test $extfs_version -ge 1 -a $extfs_version_major -lt 42 ; then extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; suggest you upgrade the library!" AC_MSG_RESULT($extfs_version) AC_MSG_WARN(Suggest upgrade your libextfs to 1.42 or newer version!) AC_DEFINE_UNQUOTED([EXTFS_1_41], "1", ["define e2fs version"]) else extfs_version="$extfs_version.$extfs_version_major.$extfs_version_minor; ok!" AC_MSG_RESULT($extfs_version) fi supported_fs=$supported_fs" extfs" fi #end of check extfs ##XFS## AC_ARG_ENABLE(xfs, AS_HELP_STRING(--enable-xfs,enable XFS file system), enable_xfs=yes, enable_xfs=no ) AM_CONDITIONAL(ENABLE_XFS, test "$enable_xfs" = yes) if test "$enable_xfs" = "yes"; then #check library of some filesystems dnl Check runtime library which depended by XFS AC_CHECK_LIB([rt], [aio_init], true, AC_MSG_ERROR([*** runtime library (libc6) not found]) ) dnl Check for XFS AC_CHECKING([ for XFS Library and Header files ... ]) AC_CHECK_HEADERS([xfs/libxfs.h], , AC_MSG_ERROR([*** XFS header (libxfs.h) not found]) ) supported_fs=$supported_fs" xfs" fi xfs_version="version unknown, suggest 3.1.1" #end of check xfs ##reiserfs## AC_ARG_ENABLE(reiserfs, AS_HELP_STRING(--enable-reiserfs,enable REISERFS 3.6/3.6 file system), enable_reiserfs=yes, enable_reiserfs=no ) AM_CONDITIONAL(ENABLE_REISERFS, test "$enable_reiserfs" = yes) if test "$enable_reiserfs" = "yes"; then dnl Check for REISERFS AC_CHECKING([ for Reiserfs Library and Header files ... ]) AC_CHECK_HEADERS([reiserfs/reiserfs.h], , AC_MSG_ERROR([*** reiserfs header files (reiserfs/reiserfs.h) not found]) ) AC_CHECK_LIB([reiserfs], [reiserfs_fs_open], true, AC_MSG_ERROR([*** Reiserfs library (libreiserfs) not found])) AC_CHECK_LIB([dal], [file_dal_open], true, AC_MSG_ERROR([*** Reiserfs depend library (libdal) not found])) AC_MSG_CHECKING(version of libreiserfs) reiserfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lreiserfs -DREISERFS` reiserfs_version=`$srcdir/get_lib_version reiserfs` AC_DEFINE_UNQUOTED([REISERFS_VERSION], "${reiserfs_version}", ["define reiserfs version"]) reiserfs_version=`$srcdir/get_lib_version reiserfs | cut -d'.' -f1` reiserfs_version_major=`$srcdir/get_lib_version reiserfs | cut -d'.' -f2` reiserfs_version_minor=`$srcdir/get_lib_version reiserfs | cut -d'.' -f3` reiserfs_version_minor_2=`$srcdir/get_lib_version reiserfs | cut -d'.' -f4` if test -z "$reiserfs_version"; then reiserfs_version="?" reiserfs_version_major="?" reiserfs_version_minor="?" reiserfs_version_minor_2="?" reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; bad" AC_MSG_RESULT($reiserfs_version) AC_MSG_ERROR(Please check your libreiserfs!) fi if test $reiserfs_version_major -lt 3 ; then reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; bad" AC_MSG_RESULT($reiserfs_version) AC_MSG_ERROR(Please upgrade your libreiserfs to 0.3.0.5 or newer version!) elif test $reiserfs_version_major -ge 3 -a $reiserfs_version_minor_2 -lt 5 ; then reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; suggest you upgrade the library!" AC_MSG_RESULT($reiserfs_version) AC_MSG_ERROR(Please upgrade your libreiserfs to 0.3.0.5 or newer version!) else reiserfs_version="$reiserfs_version.$reiserfs_version_major.$reiserfs_version_minor.$reiserfs_version_minor_2; ok!" AC_MSG_RESULT($reiserfs_version) fi supported_fs=$supported_fs" reiserfs" fi #end of check reiserfs ##reiser4## AC_ARG_ENABLE(reiser4, AS_HELP_STRING(--enable-reiser4,enable Reiser4 file system), enable_reiser4=yes, enable_reiser4=no ) AM_CONDITIONAL(ENABLE_REISER4, test "$enable_reiser4" = yes) if test "$enable_reiser4" = "yes"; then dnl Check for REISER4 dnl Check uuid library which depended by REISER4 AC_CHECKING([ for Reiser4 Library and Header files ... ]) AC_CHECK_HEADERS([reiser4/libreiser4.h], , AC_MSG_ERROR([*** reiser4 header files (reiser4/libreiser4.h) not found]) ) #AC_CHECK_LIB([reiser4 -laal], [reiser4_init], , # AC_MSG_ERROR([*** Reiser4 library (libreiser4) not found])) AC_CHECK_LIB([aal], [aal_device_open], true, AC_MSG_ERROR([*** Reiser4 depend library (libaal) not found])) AC_MSG_CHECKING(version of libreiser4) reiser4_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lreiser4 -laal -DREISER4` reiser4_version=`$srcdir/get_lib_version reiser4` AC_DEFINE_UNQUOTED([REISER4_VERSION], "${reiser4_version}", ["define reiser4 version"]) reiser4_version=`$srcdir/get_lib_version reiser4 | cut -d'.' -f1` reiser4_version_major=`$srcdir/get_lib_version reiser4 | cut -d'.' -f2` reiser4_version_minor=`$srcdir/get_lib_version reiser4 | cut -d'.' -f3` if test -z "$reiser4_version"; then reiser4_version="?" reiser4_version_major="?" reiser4_version_minor="?" reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; bad" AC_MSG_RESULT($reiser4_version) AC_MSG_ERROR(Please check your libreiser4!) fi if test $reiser4_version -lt 1 ; then reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; bad" AC_MSG_RESULT($reiser4_version) AC_MSG_ERROR(Please upgrade your libreiser4 to 1.0.6 or newer version!) elif test $reiser4_version -ge 1 -a $reiser4_version_minor -lt 6 ; then reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; suggest you upgrade the library!" AC_MSG_RESULT($reiser4_version) AC_MSG_ERROR(Please upgrade your libreiser4 to 1.0.6 or newer version!) else reiser4_version="$reiser4_version.$reiser4_version_major.$reiser4_version_minor; ok!" AC_MSG_RESULT($reiser4_version) fi supported_fs=$supported_fs" reiser4" fi #end of check reiser4 ##hfs plus## AC_ARG_ENABLE(hfsp, AS_HELP_STRING(--enable-hfsp,enable HFS plus file system), enable_hfsp=yes, enable_hfsp=no ) AM_CONDITIONAL(ENABLE_HFSP, test "$enable_hfsp" = yes) if test "$enable_hfsp" = "yes"; then supported_fs=$supported_fs" hfs-plus" hfs_plus_version="build-in" fi #end of check hfsplus ##fat## AC_ARG_ENABLE(fat, AS_HELP_STRING(--enable-fat,enable FAT file system), enable_fat=yes, enable_fat=no ) AM_CONDITIONAL(ENABLE_FAT, test "$enable_fat" = yes) if test "$enable_fat" = "yes"; then supported_fs=$supported_fs" fat" fat_version="build-in" fi #end of check fat ##exfat## AC_ARG_ENABLE(exfat, AS_HELP_STRING(--enable-exfat,enable EXFAT file system), enable_exfat=yes, enable_exfat=no ) AM_CONDITIONAL(ENABLE_EXFAT, test "$enable_exfat" = yes) if test "$enable_exfat" = "yes"; then supported_fs=$supported_fs" exfat" exfat_version="build-in" fi #end of check exfat ##NTFS## AC_ARG_ENABLE(ntfs, AS_HELP_STRING(--enable-ntfs,enable NTFS file system), enable_ntfs=yes, enable_ntfs=no ) if test "$enable_ntfs" = "yes"; then ntfs_3g_h=0 ntfs_3g_l=0 ntfsprogs_h=0 ntfsprogs_l=0 #check library of some filesystems dnl Check for NTFS-3g AC_CHECKING([ for NTFS-3g Library and Header files ... ]) AC_CHECK_HEADERS([ntfs-3g/misc.h], ntfs_3g_h=1, AC_MSG_WARN([*** NTFS(libntfs-3g-dev) header not found])) AC_CHECK_LIB([ntfs-3g], [ntfs_mount], ntfs_3g_l=1, AC_MSG_WARN([*** ntfs depend library (libntfs-3g) not found])) dnl Check for NTFSPROGS AC_CHECKING([ for NTFS Library and Header files ... ]) AC_CHECK_HEADERS([ntfs/version.h], ntfsprogs_h=1, AC_MSG_WARN([*** NTFS(ntfsprogs) header not found])) AC_CHECK_LIB([ntfs], [ntfs_mount], ntfsprogs_l=1, AC_MSG_WARN([*** ntfsprogs library (libntfs) not found])) fi AM_CONDITIONAL(ENABLE_NTFS_3G, test "$ntfs_3g_l" = 1) AM_CONDITIONAL(ENABLE_NTFS_PROGS, test "$ntfsprogs_l" = 1) AM_CONDITIONAL(ENABLE_NTFS, test "$ntfsprogs_l" = 1 -o "$ntfs_3g_l" = 1) define_ntfs_version="ntfs-3g" if test "$ntfs_3g_h" = 1 -a "$ntfs_3g_l" = 1; then supported_fs=$supported_fs" ntfs" ntfs_version="ntfs-3g" AC_DEFINE_UNQUOTED([NTFS_VERSION], "${ntfs_version}", ["define ntfs version"]) elif test "$ntfsprogs_h" = 1 -a "$ntfsprogs_l" = 1; then AC_MSG_CHECKING(version of libntfs) ntfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lntfs -DNTFS` ntfs_version=`$srcdir/get_lib_version ntfs` AC_DEFINE_UNQUOTED([NTFS_VERSION], "${ntfs_version}", ["define ntfs version"]) ntfs_version=`$srcdir/get_lib_version ntfs | cut -d':' -f1` ntfs_version_major=`$srcdir/get_lib_version ntfs | cut -d':' -f2` ntfs_version_minor=`$srcdir/get_lib_version ntfs | cut -d':' -f3` if test -z "$ntfs_version"; then ntfs_version="?" ntfs_version_major="?" ntfs_version_minor="?" ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; bad" AC_MSG_RESULT($ntfs_version) AC_MSG_ERROR(Please check your libntfs!) fi if test "$ntfs_version" -lt 9 ; then ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; bad" AC_MSG_RESULT($ntfs_version) AC_MSG_ERROR(Please upgrade your libntfs to 9:0:0 or newer version!) elif test "$ntfs_version" -eq 9 ; then ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; suggest you upgrade the library!" AC_MSG_RESULT($ntfs_version) else ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; ok!" AC_MSG_RESULT($ntfs_version) supported_fs=$supported_fs" ntfs" fi define_ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor" else if test "$enable_ntfs" = "yes"; then AC_MSG_ERROR(Can't find ntfs library!) fi fi #end of check ntfs ##UFS## AC_ARG_ENABLE(ufs, AS_HELP_STRING(--enable-ufs,enable UFS(1/2) file system), enable_ufs=yes, enable_ufs=no ) AM_CONDITIONAL(ENABLE_UFS, test "$enable_ufs" = yes) if test "$enable_ufs" = "yes"; then #check library of some filesystems dnl Check for UFS AC_CHECKING([ for UFS Library ... ]) AC_CHECK_LIB([ufs], [ufs_disk_fillout], true, AC_MSG_ERROR([*** ufs depend library (libufs2) not found])) supported_fs=$supported_fs" ufs" ufs_version="unknown, suggest 7.0-2" fi #end of check ufs ##VMFS## AC_ARG_ENABLE(vmfs, AS_HELP_STRING(--enable-vmfs,enable vmfs file system), enable_vmfs=yes, enable_vmfs=no ) AM_CONDITIONAL(ENABLE_VMFS, test "$enable_vmfs" = yes) if test "$enable_vmfs" = "yes"; then #check library of some filesystems dnl Check for VMFS ##AC_CHECKING([ for VMFS Library and Header files ... ]) ##AC_CHECK_HEADERS([uuid/uuid.h vmfs/vmfs.h], , ## AC_MSG_ERROR([*** VMFS(vmfs-tools) header not found])) AC_CHECKING([for VMFS Library files ... ]) AC_CHECK_LIB([vmfs -luuid], [vmfs_host_init], true, AC_MSG_ERROR([*** vmfs depend library (libvmfs) not found])) supported_fs=$supported_fs" vmfs" vmfs_version=`gcc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lvmfs -DVMFS $uuidcfg` vmfs_version=`$srcdir/get_lib_version vmfs` fi #end of check vmfs ##JFS## AC_ARG_ENABLE(jfs, AS_HELP_STRING(--enable-jfs,enable jfs file system), enable_jfs=yes, enable_jfs=no ) AM_CONDITIONAL(ENABLE_JFS, test "$enable_jfs" = yes) if test "$enable_jfs" = "yes"; then #check library of some filesystems dnl Check for JFS ##AC_CHECKING([ for JFS Library and Header files ... ]) ##AC_CHECK_HEADERS([uuid/uuid.h jfs/jfs_superblock.h], , ## AC_MSG_ERROR([*** JFS(libjfs) header not found])) AC_CHECKING([for JFS Library files ... ]) AC_CHECK_LIB([jfs -luuid], [ujfs_get_superblk], true, AC_MSG_ERROR([*** jfs depend library (libjfs) not found])) supported_fs=$supported_fs" jfs" jfs_version="version unknown, suggest 1.1.12" fi #end of check jfs ##btrfs## AC_ARG_ENABLE(btrfs, AS_HELP_STRING(--enable-btrfs,enable btrfs file system), enable_btrfs=yes, enable_btrfs=no ) AM_CONDITIONAL(ENABLE_BTRFS, test "$enable_btrfs" = yes) if test "$enable_btrfs" = yes; then supported_fs=$supported_fs" btrfs" btrfs_version="0.19" fi #end of check btrfs ##libncursesw## AC_ARG_ENABLE(ncursesw, AS_HELP_STRING(--enable-ncursesw,enable TEXT User Interface), enable_ncursesw=yes, ) AM_CONDITIONAL(ENABLE_NCURSESW, test "$enable_ncursesw" = yes) if test "$enable_ncursesw" = "yes"; then dnl Check for NCURSESW AC_CHECKING([ for Ncursesw Library and Header files ... ]) AC_CHECK_HEADERS([ncurses.h], , AC_MSG_ERROR([*** ncurses header files (ncurses.h) not found]) ) AC_CHECK_LIB([ncursesw], [initscr], , AC_MSG_ERROR([*** Ncursesw library (libncursesw5) not found])) fi ##static linking## AC_ARG_ENABLE(static, AS_HELP_STRING(--enable-static, enable static linking), enable_static=yes, ) AM_CONDITIONAL(ENABLE_STATIC, test "$enable_static" = yes) AC_CHECK_LIB([tinfo], [initscr], tinfo=1, AC_MSG_WARN([*** tinfo library (libtinfo) not found])) AM_CONDITIONAL(ENABLE_TINFO, test "$tinfo" = 1) ##memory tracing## AC_ARG_ENABLE(mtrace, AS_HELP_STRING(--enable-mtrace, enable memory tracing), enable_memtrace=yes, ) AM_CONDITIONAL(ENABLE_MEMTRACE, test "$enable_memtrace" = yes) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ Makefile src/Makefile po/Makefile.in docs/Makefile ]) AC_OUTPUT echo "" echo "Support File System:" echo "ext2/3/4...... $enable_extfs, $extfs_version" echo "reiserfs...... $enable_reiserfs, $reiserfs_version" echo "reiser4....... $enable_reiser4, $reiser4_version" echo "xfs........... $enable_xfs, $xfs_version" echo "ntfs.......... $enable_ntfs, $ntfs_version" echo "fat12/16/32... $enable_fat, $fat_version" echo "exfat......... $enable_exfat, $exfat_version" echo "hfs plus...... $enable_hfsp, $hfs_plus_version" echo "ufs .......... $enable_ufs, $ufs_version" echo "vmfs ......... $enable_vmfs, $vmfs_version" echo "jfs .......... $enable_jfs, $jfs_version" echo "btrfs......... $enable_btrfs, $btrfs_version" #echo $supported_fs partclone-0.2.51/depcomp000077500000000000000000000422461200565264100151540ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: partclone-0.2.51/docs/000077500000000000000000000000001200565264100145175ustar00rootroot00000000000000partclone-0.2.51/docs/Makefile.am000066400000000000000000000030261200565264100165540ustar00rootroot00000000000000XSLTPROC=xsltproc MAN_STYLESHEET=/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl man_MANS = partclone.info.8 partclone.chkimg.8 partclone.dd.8 partclone.restore.8 partclone.8 if ENABLE_EXTFS man_MANS += partclone.extfs.8 man_MANS += partclone.ext2.8 man_MANS += partclone.ext3.8 man_MANS += partclone.ext4.8 man_MANS += partclone.ext4dev.8 endif if ENABLE_REISERFS man_MANS += partclone.reiserfs.8 endif if ENABLE_REISER4 man_MANS += partclone.reiser4.8 endif if ENABLE_HFSP man_MANS += partclone.hfsplus.8 man_MANS += partclone.hfs+.8 endif if ENABLE_XFS man_MANS += partclone.xfs.8 endif if ENABLE_EXFAT man_MANS += partclone.exfat.8 endif if ENABLE_FAT man_MANS += partclone.vfat.8 man_MANS += partclone.fat12.8 man_MANS += partclone.fat16.8 man_MANS += partclone.fat32.8 endif if ENABLE_UFS man_MANS += partclone.ufs.8 endif if ENABLE_VMFS man_MANS += partclone.vmfs.8 endif if ENABLE_JFS man_MANS += partclone.jfs.8 endif if ENABLE_BTRFS man_MANS += partclone.btrfs.8 endif if ENABLE_NTFS man_MANS += partclone.ntfs.8 endif FORCE: partclone.dd.8: partclone.dd.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.dd.xml) partclone.chkimg.8: partclone.chkimg.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.chkimg.xml) partclone.info.8: partclone.info.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.info.xml) partclone.restore.8: partclone.restore.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.restore.xml) partclone.8: partclone.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.xml) partclone-0.2.51/docs/Makefile.in000066400000000000000000000347671200565264100166050ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ @ENABLE_EXTFS_TRUE@am__append_1 = partclone.extfs.8 partclone.ext2.8 \ @ENABLE_EXTFS_TRUE@ partclone.ext3.8 partclone.ext4.8 \ @ENABLE_EXTFS_TRUE@ partclone.ext4dev.8 @ENABLE_REISERFS_TRUE@am__append_2 = partclone.reiserfs.8 @ENABLE_REISER4_TRUE@am__append_3 = partclone.reiser4.8 @ENABLE_HFSP_TRUE@am__append_4 = partclone.hfsplus.8 partclone.hfs+.8 @ENABLE_XFS_TRUE@am__append_5 = partclone.xfs.8 @ENABLE_EXFAT_TRUE@am__append_6 = partclone.exfat.8 @ENABLE_FAT_TRUE@am__append_7 = partclone.vfat.8 partclone.fat12.8 \ @ENABLE_FAT_TRUE@ partclone.fat16.8 partclone.fat32.8 @ENABLE_UFS_TRUE@am__append_8 = partclone.ufs.8 @ENABLE_VMFS_TRUE@am__append_9 = partclone.vmfs.8 @ENABLE_JFS_TRUE@am__append_10 = partclone.jfs.8 @ENABLE_BTRFS_TRUE@am__append_11 = partclone.btrfs.8 @ENABLE_NTFS_TRUE@am__append_12 = partclone.ntfs.8 subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man8dir = $(mandir)/man8 am__installdirs = "$(DESTDIR)$(man8dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ 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@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RM = @RM@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ XSLTPROC = xsltproc MAN_STYLESHEET = /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl man_MANS = partclone.info.8 partclone.chkimg.8 partclone.dd.8 \ partclone.restore.8 partclone.8 $(am__append_1) \ $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) $(am__append_7) \ $(am__append_8) $(am__append_9) $(am__append_10) \ $(am__append_11) $(am__append_12) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-man8: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list=''; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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 installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man8 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-man uninstall-man8 FORCE: partclone.dd.8: partclone.dd.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.dd.xml) partclone.chkimg.8: partclone.chkimg.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.chkimg.xml) partclone.info.8: partclone.info.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.info.xml) partclone.restore.8: partclone.restore.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.restore.xml) partclone.8: partclone.xml -@($(XSLTPROC) --nonet $(MAN_STYLESHEET) partclone.xml) # 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. .NOEXPORT: partclone-0.2.51/docs/partclone.btrfs.8000066400000000000000000000000251200565264100177130ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.chkimg.xml000066400000000000000000000273171200565264100205030ustar00rootroot00000000000000 .
will be generated. You may view the manual page with: nroff -man .
| less'. A typical entry in a Makefile or Makefile.am is: DB2MAN = /usr/share/sgml/docbookstylesheet/xsl/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" manpage.1: manpage.xml $(XP) $(DB2MAN) $< The xsltproc binary is found in the xsltproc package. The XSL files are in docbook-xsl. A description of the parameters you can use can be found in the docbook-xsl-doc-* packages. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include xsltproc and docbook-xsl in your Build-Depends control field. Alternatively use the xmlto command/package. That will also automatically pull in xsltproc and docbook-xsl. Notes for using docbook2x: docbook2x-man does not automatically create the AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as ... . To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be found in the docbook-xsl-doc-html package. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` General documentation about man-pages and man-page-formatting: man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ --> ]> &dhtitle; &dhpackage; &dhfirstname; &dhsurname;
&dhemail;
2007 &dhusername; This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
&dhucpackage; &dhsection; &dhpackage; The utility to check image made by partclone &dhpackage; source logfile DESCRIPTION &dhpackage; is a part of Partclone project to veritfy image file. Partclone provide utilities to backup used blocks and design for higher compatibility of the file system by using existing library, e.g. e2fslibs is used to read the used block of ext2 partition. Partclone supported file system include btrfs, ext2, ext3, ext4, reiserfs, reiser4, xfs and jfs for LINUX. Also support some non-linux operation system, ex: NTFS, FAT, EXFAT(for Windows), HFS plus(APPLE MAC OS), UFS2(FreeBSD), VMFS(VMWare Vsphere). All partclone utils could be run like partclone.xxx is very smiliar fsck or mkfs. For example, for backup/restore hfsplus, just run partclone.hfsp. OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. Source FILE. The FILE could be a image file(made by partclone) or device depend on your action. Normanly, backup source is device, restore source is image file. Receving data from pipe line is supported ONLY for restoring, just ignore -s option or use '-' means receive data from stdin. put special path to record partclone log information.(default /var/log/partclone.log) Don't check device size and free space. Using Ncurses Text User Interface. Output message as Dialog Format. Ignore crc check error. Force progress. put special second to different interval. Set the debug level [1|2|3] Show summary of options. Show version of program. FILES /var/log/partclone.log The log file of &dhpackage; EXAMPLES check part.img file is correct or not. partclone.chkimg -d -s partclone.img DIAGNOSTICS The following diagnostics may be issued on stderr: &dhpackage; provides some return codes, that can be used in scripts: Code Diagnostic 0 Program exited successfully. 1 Clone or Restore seem failed. BUGS Report bugs to &dhemail; or . You can get support at http://partclone.org SEE ALSO partclone 8 , partclone.chkimg 8 , partclone.restore 8 , partclone.dd 8 , partclone.info 8
partclone-0.2.51/docs/partclone.dd.xml000066400000000000000000000402311200565264100176160ustar00rootroot00000000000000 .
will be generated. You may view the manual page with: nroff -man .
| less'. A typical entry in a Makefile or Makefile.am is: DB2MAN = /usr/share/sgml/docbookstylesheet/xsl/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" manpage.1: manpage.xml $(XP) $(DB2MAN) $< The xsltproc binary is found in the xsltproc package. The XSL files are in docbook-xsl. A description of the parameters you can use can be found in the docbook-xsl-doc-* packages. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include xsltproc and docbook-xsl in your Build-Depends control field. Alternatively use the xmlto command/package. That will also automatically pull in xsltproc and docbook-xsl. Notes for using docbook2x: docbook2x-man does not automatically create the AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as ... . To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be found in the docbook-xsl-doc-html package. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` General documentation about man-pages and man-page-formatting: man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ --> ]> &dhtitle; &dhpackage; &dhfirstname; &dhsurname;
&dhemail;
2007 &dhusername; This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
&dhucpackage; &dhsection; &dhpackage; unsupported file system backup utility.(like `dd` ) &dhpackage; source target logfile DESCRIPTION &dhpackage; is a part of Partclone project to clone unsupported file system with dd method. It will backup all block from partition. Partclone provide utilities to backup used blocks and design for higher compatibility of the file system by using existing library, e.g. e2fslibs is used to read the used block of ext2 partition. Partclone supported file system include btrfs, ext2, ext3, ext4, reiserfs, reiser4, xfs and jfs for LINUX. Also support some non-linux operation system, ex: NTFS and FAT (for Windows), HFS plus(APPLE MAC OS), UFS2(FreeBSD), VMFS(VMWare Vsphere). All partclone utils could be run like partclone.xxx is very smiliar fsck or mkfs. For example, for backup/restore hfsplus, just run partclone.hfsp. OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. Source FILE. The FILE could be a image file(made by partclone) or device depend on your action. Normanly, backup source is device, restore source is image file. Receving data from pipe line is supported ONLY for restoring, just ignore -s option or use '-' means receive data from stdin. Output FILE. The FILE could be a image file(partclone will generate) or device depend on your action. Normanly, backup output to image file and restore output to device. Sending data to pipe line is also supported ONLY for back-up, just ignore -o option or use '-' means send data to stdout. Overwrite FILE, overwriting if exists. Save partition to the special image format. Restore partition from the special image format. Local device to device copy on-the-fly, source and output both are device. Creating special raw file for loop device. put special path to record partclone log information.(default /var/log/partclone.log) Continue after disk read errors. Don't check device size and free space. Using Ncurses Text User Interface. Output message as Dialog Format. Ignore filesystem check. Ignore crc check error. Force progress. put special second to different interval. The used block will be cache until max number. Disable progress message. Set the debug level [1|2|3] Show summary of options. Show version of program. FILES /var/log/partclone.log The log file of &dhpackage; EXAMPLES clone /dev/hda1 to hda1.dd.img and display debug information. partclone.dd -c -d -s /dev/hda1 -o hda1.dd.img restore /dev/hda1 from hda1.dd.img and display debug information. partclone.dd -r -d -s hda1.dd.img -o /dev/hda1 DIAGNOSTICS The following diagnostics may be issued on stderr: &dhpackage; provides some return codes, that can be used in scripts: Code Diagnostic 0 Program exited successfully. 1 Clone or Restore seem failed. BUGS Report bugs to &dhemail; or . You can get support at http://partclone.org SEE ALSO partclone 8 , partclone.chkimg 8 , partclone.restore 8 , partclone.dd 8 , partclone.info 8
partclone-0.2.51/docs/partclone.exfat.8000066400000000000000000000000251200565264100177020ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.ext2.8000066400000000000000000000000251200565264100174550ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.ext3.8000066400000000000000000000000251200565264100174560ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.ext4.8000066400000000000000000000000251200565264100174570ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.ext4dev.8000066400000000000000000000000251200565264100201560ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.extfs.8000066400000000000000000000000251200565264100177240ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.fat12.8000066400000000000000000000000251200565264100175100ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.fat16.8000066400000000000000000000000251200565264100175140ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.fat32.8000066400000000000000000000000251200565264100175120ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.hfs+.8000066400000000000000000000000251200565264100174260ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.hfsplus.8000066400000000000000000000000251200565264100202570ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.info.xml000066400000000000000000000171371200565264100201730ustar00rootroot00000000000000 .
will be generated. You may view the manual page with: nroff -man .
| less'. A typical entry in a Makefile or Makefile.am is: DB2MAN = /usr/share/sgml/docbookstylesheet/xsl/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" manpage.1: manpage.xml $(XP) $(DB2MAN) $< The xsltproc binary is found in the xsltproc package. The XSL files are in docbook-xsl. A description of the parameters you can use can be found in the docbook-xsl-doc-* packages. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include xsltproc and docbook-xsl in your Build-Depends control field. Alternatively use the xmlto command/package. That will also automatically pull in xsltproc and docbook-xsl. Notes for using docbook2x: docbook2x-man does not automatically create the AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as ... . To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be found in the docbook-xsl-doc-html package. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` General documentation about man-pages and man-page-formatting: man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ --> ]> &dhtitle; &dhpackage; &dhfirstname; &dhsurname;
&dhemail;
2007 &dhusername; This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
&dhucpackage; &dhsection; &dhpackage; The utility to show image head information. &dhpackage; FILE DESCRIPTION &dhpackage; is a part of Partclone project to retrive partition head information from image file. Partclone provide utilities to backup used blocks and design for higher compatibility of the file system by using existing library, e.g. e2fslibs is used to read the used block of ext2 partition. Partclone supported file system include btrfs, ext2, ext3, ext4, reiserfs, reiser4, xfs and jfs for LINUX. Also support some non-linux operation system, ex: NTFS, FAT, EXFAT(for Windows), HFS plus(APPLE MAC OS), UFS2(FreeBSD), VMFS(VMWare Vsphere). All partclone utils could be run like partclone.xxx is very smiliar fsck or mkfs. For example, for backup/restore hfsplus, just run partclone.hfsp. OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. Image FILE. The FILE could be a image file(made by partclone). EXAMPLES Retriving partition usage information partclone.info /home/partimag/sdb2.img Partclone v0.2.20 http://partclone.org File system: EXTFS Device size: 928.0 MB Space in use: 535.4 MB Free Space: 392.6 MB Block size: 4096 Byte Used block : 130708 DIAGNOSTICS The following diagnostics may be issued on stderr: &dhpackage; provides some return codes, that can be used in scripts: Code Diagnostic 0 Program exited successfully. 1 Clone or Restore seem failed. BUGS Report bugs to &dhemail; or . You can get support at http://partclone.org SEE ALSO partclone 8 , partclone.chkimg 8 , partclone.restore 8 , partclone.dd 8 , partclone.info 8
partclone-0.2.51/docs/partclone.jfs.8000066400000000000000000000000251200565264100173550ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.ntfs.8000066400000000000000000000000251200565264100175450ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.reiser4.8000066400000000000000000000000251200565264100201500ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.reiserfs.8000066400000000000000000000000251200565264100204150ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.restore.xml000066400000000000000000000361511200565264100207200ustar00rootroot00000000000000 .
will be generated. You may view the manual page with: nroff -man .
| less'. A typical entry in a Makefile or Makefile.am is: DB2MAN = /usr/share/sgml/docbookstylesheet/xsl/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" manpage.1: manpage.xml $(XP) $(DB2MAN) $< The xsltproc binary is found in the xsltproc package. The XSL files are in docbook-xsl. A description of the parameters you can use can be found in the docbook-xsl-doc-* packages. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include xsltproc and docbook-xsl in your Build-Depends control field. Alternatively use the xmlto command/package. That will also automatically pull in xsltproc and docbook-xsl. Notes for using docbook2x: docbook2x-man does not automatically create the AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as ... . To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be found in the docbook-xsl-doc-html package. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` General documentation about man-pages and man-page-formatting: man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ --> ]> &dhtitle; &dhpackage; &dhfirstname; &dhsurname;
&dhemail;
2007 &dhusername; This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
&dhucpackage; &dhsection; &dhpackage; restore partclone image to device. &dhpackage; source target logfile DESCRIPTION &dhpackage; is a part of Partclone project to restore all image made from partclone.[fstype] or partclone.dd. Partclone provide utilities to backup used blocks and design for higher compatibility of the file system by using existing library, e.g. e2fslibs is used to read the used block of ext2 partition. Partclone supported file system include btrfs, ext2, ext3, ext4, reiserfs, reiser4, xfs and jfs for LINUX. Also support some non-linux operation system, ex: NTFS, FAT, EXFAT(for Windows), HFS plus(APPLE MAC OS), UFS2(FreeBSD), VMFS(VMWare Vsphere). All partclone utils could be run like partclone.xxx is very smiliar fsck or mkfs. For example, for backup/restore hfsplus, just run partclone.hfsp. OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. Source FILE. The FILE could be a image file(made by partclone) or device depend on your action. Normanly, backup source is device, restore source is image file. Receving data from pipe line is supported ONLY for restoring, just ignore -s option or use '-' means receive data from stdin. Output FILE. The FILE could be a image file(partclone will generate) or device depend on your action. Normanly, backup output to image file and restore output to device. Sending data to pipe line is also supported ONLY for back-up, just ignore -o option or use '-' means send data to stdout. Overwrite FILE, overwriting if exists. Creating special raw file for loop device. put special path to record partclone log information.(default /var/log/partclone.log) Continue after disk read errors. Don't check device size and free space. Using Ncurses Text User Interface. Output message as Dialog Format. Ignore filesystem check. Ignore crc check error. Force progress. put special second to different interval. The used block will be cache until max number. Disable progress message. Set the debug level [1|2|3] Show summary of options. Show version of program. FILES /var/log/partclone.log The log file of &dhpackage; EXAMPLES restore /dev/hda1 from hda1.img and display debug information. partclone.restore -d -s hda1.img -o /dev/hda1 restore image from clonezilla(split, gzip,) with stdin source cat sda1.ext3-ptcl-img.gz.a* | gunzip -c | partclone.restore -d -s - -o /dev/sda1 restore raw image from partclone.dd partclone.dd -d -c -s /dev/sda1 -o - | partclone.restore -d -s - -o /dev/sdb1 DIAGNOSTICS The following diagnostics may be issued on stderr: &dhpackage; provides some return codes, that can be used in scripts: Code Diagnostic 0 Program exited successfully. 1 Clone or Restore seem failed. BUGS Report bugs to &dhemail; or . You can get support at http://partclone.org SEE ALSO partclone 8 , partclone.chkimg 8 , partclone.restore 8 , partclone.dd 8 , partclone.info 8
partclone-0.2.51/docs/partclone.ufs.8000066400000000000000000000000251200565264100173700ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.vfat.8000066400000000000000000000000251200565264100175330ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.vmfs.8000066400000000000000000000000251200565264100175460ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.xfs.8000066400000000000000000000000251200565264100173730ustar00rootroot00000000000000.so man8/partclone.8 partclone-0.2.51/docs/partclone.xml000066400000000000000000000432531200565264100172370ustar00rootroot00000000000000 .
will be generated. You may view the manual page with: nroff -man .
| less'. A typical entry in a Makefile or Makefile.am is: DB2MAN = /usr/share/sgml/docbookstylesheet/xsl/docbook-xsl/manpages/docbook.xsl or DB2MAN = /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" manpage.1: manpage.xml $(XP) $(DB2MAN) $< The xsltproc binary is found in the xsltproc package. The XSL files are in docbook-xsl. A description of the parameters you can use can be found in the docbook-xsl-doc-* packages. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include xsltproc and docbook-xsl in your Build-Depends control field. Alternatively use the xmlto command/package. That will also automatically pull in xsltproc and docbook-xsl. Notes for using docbook2x: docbook2x-man does not automatically create the AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as ... . To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be found in the docbook-xsl-doc-html package. Validation can be done using: `xmllint -''-noout -''-valid manpage.xml` General documentation about man-pages and man-page-formatting: man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ --> ]> &dhtitle; &dhpackage; &dhfirstname; &dhsurname;
&dhemail;
2007 &dhusername; This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
&dhucpackage; &dhsection; &dhpackage; The utility for clone and restore a partition. &dhpackage;.[fstype] source target logfile DESCRIPTION &dhpackage;.[fstype] is a part of Partclone project. Partclone provide utilities to backup used blocks and design for higher compatibility of the file system by using existing library, e.g. e2fslibs is used to read the used block of ext2 partition. Partclone supported file system include btrfs, ext2, ext3, ext4, reiserfs, reiser4, xfs and jfs for LINUX. Also support some non-linux operation system, ex: NTFS, FAT and EXFAT(for Windows), HFS plus(APPLE MAC OS), UFS2(FreeBSD), VMFS(VMWare Vsphere). All partclone utils could be run like partclone.[fstype] is very smiliar fsck or mkfs. For example, for backup/restore hfsplus, just run partclone.hfsp File System partclone.[fstype] btrfs partclone.btrfs ext2, ext3, ext4 partclone.[ext2|ext3|ext4] reiserfs 3.5 partclone.reiserfs reiser 4 partclone.reiser4 xfs partclone.xfs ufs | ufs2 partclone.ufs jfs partclone.jfs hfs plusfs partclone.[hfs+|hfsplus] vmfs partclone.vmfs ntfs partclone.ntfs fat12, fat16, fat32 partclone.[fat12|fat16|fat32] exfat partclone.exfat OPTIONS The program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. Source FILE. The FILE could be a image file(made by partclone) or device depend on your action. Normanly, backup source is device, restore source is image file. Receving data from pipe line is supported ONLY for restoring, just ignore -s option or use '-' means receive data from stdin. Output FILE. The FILE could be a image file(partclone will generate) or device depend on your action. Normanly, backup output to image file and restore output to device. Sending data to pipe line is also supported ONLY for back-up, just ignore -o option or use '-' means send data to stdout. Overwrite FILE, overwriting if exists. Save partition to the special image format. Restore partition from the special image format. Local device to device copy on-the-fly, source and output both are device. Create GNU Ddrescue domain log file from source device Add X (in bytes) to all positions reported in the domain log file Creating special raw file for loop device. put special path to record partclone log information.(default /var/log/partclone.log) Continue after disk read errors. Don't check device size and free space. Using Ncurses Text User Interface. Output message as Dialog Format. Ignore filesystem check. Ignore crc check error. Force progress. put special second to different interval. The used block will be cache until max number. Disable progress message. Set the debug level [1|2|3] Show summary of options. Show version of program. FILES /var/log/partclone.log The log file of &dhpackage; EXAMPLES clone /dev/hda1 to hda1.img and display debug information. partclone.ext3 -c -d -s /dev/hda1 -o hda1.img restore /dev/hda1 from hda1.img and display debug information. partclone.extfs -r -d -s hda1.img -o /dev/hda1 restore image from clonezilla(split, gzip,) with stdin source cat sda1.ext3-ptcl-img.gz.a* | gunzip -c | partclone.ext3 -d -r -s - -o /dev/sda1 DIAGNOSTICS The following diagnostics may be issued on stderr: &dhpackage; provides some return codes, that can be used in scripts: Code Diagnostic 0 Program exited successfully. 1 Clone or Restore seem failed. BUGS Report bugs to &dhemail; or . You can get support at http://partclone.org SEE ALSO partclone 8 , partclone.chkimg 8 , partclone.restore 8 , partclone.dd 8 , partclone.info 8
partclone-0.2.51/gitlog-to-changelog000066400000000000000000000115601200565264100173470ustar00rootroot00000000000000#!/usr/bin/perl # Convert git log output to ChangeLog format. my $VERSION = '2008-12-21 12:07'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. # Copyright (C) 2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Written by Jim Meyering use strict; use warnings; use Getopt::Long; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; # use File::Coda; # http://meyering.net/code/Coda/ END { defined fileno STDOUT or return; close STDOUT and return; warn "$ME: failed to close standard output: $!\n"; $? ||= 1; } sub usage ($) { my ($exit_code) = @_; my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { print $STREAM "Try `$ME --help' for more information.\n"; } else { print $STREAM < ChangeLog $ME -- -n 5 foo > last-5-commits-to-branch-foo EOF } exit $exit_code; } # If the string $S is a well-behaved file name, simply return it. # If it contains white space, quotes, etc., quote it, and return the new string. sub shell_quote($) { my ($s) = @_; if ($s =~ m![^\w+/.,-]!) { # Convert each single quote to '\'' $s =~ s/\'/\'\\\'\'/g; # Then single quote the string. $s = "'$s'"; } return $s; } sub quoted_cmd(@) { return join (' ', map {shell_quote $_} @_); } { my $since_date = '1970-01-01 UTC'; GetOptions ( help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, ) or usage 1; my @cmd = (qw (git log --log-size), "--since=$since_date", '--pretty=format:%ct %an <%ae>%n%n%s%n%b%n', @ARGV); open PIPE, '-|', @cmd or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); my $prev_date_line = ''; while (1) { defined (my $in = ) or last; $in =~ /^log size (\d+)$/ or die "$ME:$.: Invalid line (expected log size):\n$in"; my $log_nbytes = $1; my $log; my $n_read = read PIPE, $log, $log_nbytes; $n_read == $log_nbytes or die "$ME:$.: unexpected EOF\n"; my @line = split "\n", $log; my $author_line = shift @line; defined $author_line or die "$ME:$.: unexpected EOF\n"; $author_line =~ /^(\d+) (.*>)$/ or die "$ME:$.: Invalid line " . "(expected date/author/email):\n$author_line\n"; my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); # If this line would be the same as the previous date/name/email # line, then arrange not to print it. if ($date_line ne $prev_date_line) { $prev_date_line eq '' or print "\n"; print $date_line; } $prev_date_line = $date_line; # Omit "Signed-off-by..." lines. @line = grep !/^Signed-off-by: .*>$/, @line; # Remove leading and trailing blank lines. while ($line[0] =~ /^\s*$/) { shift @line; } while ($line[$#line] =~ /^\s*$/) { pop @line; } # Prefix each non-empty line with a TAB. @line = map { length $_ ? "\t$_" : '' } @line; print "\n", join ("\n", @line), "\n"; defined ($in = ) or last; $in ne "\n" and die "$ME:$.: unexpected line:\n$in"; } close PIPE or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; # FIXME-someday: include $PROCESS_STATUS in the diagnostic } # Local Variables: # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d %02H:%02M" # time-stamp-time-zone: "UTC" # time-stamp-end: "'; # UTC" # End: partclone-0.2.51/install-sh000077500000000000000000000316001200565264100155730ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: partclone-0.2.51/m4/000077500000000000000000000000001200565264100141075ustar00rootroot00000000000000partclone-0.2.51/m4/ChangeLog000066400000000000000000000006351200565264100156650ustar00rootroot000000000000002007-11-01 gettextize * gettext.m4: New file, from gettext-0.16.1. * iconv.m4: New file, from gettext-0.16.1. * lib-ld.m4: New file, from gettext-0.16.1. * lib-link.m4: New file, from gettext-0.16.1. * lib-prefix.m4: New file, from gettext-0.16.1. * nls.m4: New file, from gettext-0.16.1. * po.m4: New file, from gettext-0.16.1. * progtest.m4: New file, from gettext-0.16.1. partclone-0.2.51/m4/gettext.m4000066400000000000000000000377321200565264100160510ustar00rootroot00000000000000# gettext.m4 serial 59 (gettext-0.16.1) dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) partclone-0.2.51/m4/iconv.m4000066400000000000000000000064261200565264100154770ustar00rootroot00000000000000# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) partclone-0.2.51/m4/lib-ld.m4000066400000000000000000000065311200565264100155210ustar00rootroot00000000000000# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) partclone-0.2.51/m4/lib-link.m4000066400000000000000000000642441200565264100160640ustar00rootroot00000000000000# lib-link.m4 serial 9 (gettext-0.16) dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.50) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) partclone-0.2.51/m4/lib-prefix.m4000066400000000000000000000150361200565264100164170ustar00rootroot00000000000000# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) partclone-0.2.51/m4/nls.m4000066400000000000000000000022661200565264100151530ustar00rootroot00000000000000# nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) partclone-0.2.51/m4/po.m4000066400000000000000000000433671200565264100150040ustar00rootroot00000000000000# po.m4 serial 13 (gettext-0.15) dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. AC_PREREQ(2.50) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) partclone-0.2.51/missing000077500000000000000000000255771200565264100152060ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: partclone-0.2.51/po/000077500000000000000000000000001200565264100142055ustar00rootroot00000000000000partclone-0.2.51/po/ChangeLog000066400000000000000000000007361200565264100157650ustar00rootroot000000000000002007-11-01 gettextize * Makefile.in.in: New file, from gettext-0.16.1. * Rules-quot: New file, from gettext-0.16.1. * boldquot.sed: New file, from gettext-0.16.1. * en@boldquot.header: New file, from gettext-0.16.1. * en@quot.header: New file, from gettext-0.16.1. * insert-header.sin: New file, from gettext-0.16.1. * quot.sed: New file, from gettext-0.16.1. * remove-potcdate.sin: New file, from gettext-0.16.1. * POTFILES.in: New file. partclone-0.2.51/po/LINGUAS000066400000000000000000000000141200565264100152250ustar00rootroot00000000000000zh_TW fr_FR partclone-0.2.51/po/Makefile.in.in000066400000000000000000000332211200565264100166600ustar00rootroot00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.16 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && $(SHELL) ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: partclone-0.2.51/po/Makevars000066400000000000000000000034271200565264100157070ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = thomas@nchc.org.tw # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = $(PACKAGE BUGREPORT) # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = partclone-0.2.51/po/POTFILES000066400000000000000000000000611200565264100153520ustar00rootroot00000000000000 ../src/progress.c \ ../src/partclone.c partclone-0.2.51/po/POTFILES.in000066400000000000000000000001321200565264100157560ustar00rootroot00000000000000# List of source files which contain translatable strings. src/progress.c src/partclone.c partclone-0.2.51/po/Rules-quot000066400000000000000000000033761200565264100162210ustar00rootroot00000000000000# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header partclone-0.2.51/po/boldquot.sed000066400000000000000000000003311200565264100165300ustar00rootroot00000000000000s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g s/“/“/g s/â€/â€/g s/‘/‘/g s/’/’/g partclone-0.2.51/po/en@boldquot.header000066400000000000000000000024711200565264100176370ustar00rootroot00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # partclone-0.2.51/po/en@quot.header000066400000000000000000000022631200565264100167750ustar00rootroot00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # partclone-0.2.51/po/fr_FR.gmo000066400000000000000000000035551200565264100157170ustar00rootroot00000000000000Þ•œxy‹Ž§¾ÕAç@)Bj#­Ñ-ã,/.\k‹÷ *D`Q{GÍJ#`„C—Û7ø<0    Total Time: %s, %sAve. Rate: %6.1f%s/min, Ave. Rate: %6.2f%s/minBlock size: %i Byte File system: %s Partclone successfully cloned the device (%s) to the device (%s) Partclone successfully cloned the device (%s) to the image (%s) Partclone successfully restored the image (%s) to the device (%s) Partclone v%s http://partclone.org Rate: %6.2f%s/minStarting to back up device(%s) to device(%s) Starting to check image (%s) Starting to clone device (%s) to image (%s) Starting to restore image (%s) to device (%s) Project-Id-Version: Partclone 0.2.9 Report-Msgid-Bugs-To: thomas@nchc.org.tw POT-Creation-Date: 2012-07-31 10:38+0800 PO-Revision-Date: 2010-11-01 10:13+0100 Last-Translator: Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); Durée totale: %s, %sDébit moyen: %6.1f%s/mn, Débit moyen: %6.2f%s/minTaille de bloc: %i octets Système de fichiers: %s Partclone a réussi à cloner le périphérique (%s) vers le périphérique (%s) Partclone a réussi à cloner le périphérique (%s) vers l'image (%s) Partclone a réussi à restaurer l'image (%s) vers le périphérique (%s) Partclone v%s http://partclone.org Débit: %6.2f%s/mnDémarrage sauvegarde périphérique (%s) vers périphérique (%s) Démarrage audit image (%s) Démarrage clonage périphérique (%s) vers image (%s) Démarrage restauration image (%s) vers périphérique (%s) partclone-0.2.51/po/fr_FR.po000066400000000000000000000130441200565264100155450ustar00rootroot00000000000000# French translations for Partclone package # Traductions françaises du paquet Partclone. # Copyright (C) 2010 thomas@nchc.org.tw # This file is distributed under the same license as the Partclone package. # Cédric OLLIVIER , 2010. # msgid "" msgstr "" "Project-Id-Version: Partclone 0.2.9\n" "Report-Msgid-Bugs-To: thomas@nchc.org.tw\n" "POT-Creation-Date: 2012-07-31 10:38+0800\n" "PO-Revision-Date: 2010-11-01 10:13+0100\n" "Last-Translator: \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: src/progress.c:197 #, fuzzy, c-format msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed: %6.2f%%" msgstr "\r%80c\rEcoulé: %s, Restant: %s, Complété:%6.2f%%," #: src/progress.c:200 #, fuzzy, c-format msgid ", %6.2f%s/min," msgstr "Débit: %6.2f%s/mn" #: src/progress.c:208 #, fuzzy, c-format msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed: 100.00%%" msgstr "\r%80c\rEcoulé: %s, Restant: %s, Complété:%6.2f%%," #: src/progress.c:210 #, fuzzy, c-format msgid ", Rate: %6.2f%s/min," msgstr "Débit: %6.2f%s/mn" #: src/progress.c:214 #, c-format msgid "" "\n" "Total Time: %s, " msgstr "" "\n" "Durée totale: %s, " #: src/progress.c:216 #, c-format msgid "Ave. Rate: %6.1f%s/min, " msgstr "Débit moyen: %6.1f%s/mn, " #: src/progress.c:217 #, c-format msgid "%s" msgstr "%s" #: src/progress.c:242 #, fuzzy, c-format msgid "Elapsed: %s Remaining: %s " msgstr "" " Ecoulé: %s\n" " Restant: %s\n" " Complété:%6.2f%%" #: src/progress.c:244 #, c-format msgid "Rate: %6.2f%s/min" msgstr "Débit: %6.2f%s/mn" #: src/progress.c:246 #, c-format msgid "Current Block: %lld Total Block: %lld " msgstr "" #: src/progress.c:277 #, fuzzy, c-format msgid "Total Time: %s Remaining: %s " msgstr "" "\n" "Durée totale: %s, " #: src/progress.c:279 #, c-format msgid "Ave. Rate: %6.2f%s/min" msgstr "Débit moyen: %6.2f%s/min" #: src/partclone.c:1010 #, c-format msgid "Partclone v%s http://partclone.org\n" msgstr "Partclone v%s http://partclone.org\n" #: src/partclone.c:1012 #, c-format msgid "Starting to check image (%s)\n" msgstr "Démarrage audit image (%s)\n" #: src/partclone.c:1014 #, c-format msgid "Starting to clone device (%s) to image (%s)\n" msgstr "Démarrage clonage périphérique (%s) vers image (%s)\n" #: src/partclone.c:1016 #, c-format msgid "Starting to restore image (%s) to device (%s)\n" msgstr "Démarrage restauration image (%s) vers périphérique (%s)\n" #: src/partclone.c:1018 #, c-format msgid "Starting to back up device(%s) to device(%s)\n" msgstr "Démarrage sauvegarde périphérique (%s) vers périphérique (%s)\n" #: src/partclone.c:1020 #, fuzzy, c-format msgid "Starting to map device (%s) to domain log (%s)\n" msgstr "Démarrage clonage périphérique (%s) vers image (%s)\n" #: src/partclone.c:1038 #, c-format msgid "File system: %s\n" msgstr "Système de fichiers: %s\n" #: src/partclone.c:1041 #, fuzzy, c-format msgid "Device size: %s = %lld Blocks\n" msgstr "Taille du périphérique: %s\n" #: src/partclone.c:1044 #, fuzzy, c-format msgid "Space in use: %s = %lld Blocks\n" msgstr "Espace utilisé: %s\n" #: src/partclone.c:1047 #, fuzzy, c-format msgid "Free Space: %s = %lld Blocks\n" msgstr "Espace libre: %s\n" #: src/partclone.c:1049 #, c-format msgid "Block size: %i Byte\n" msgstr "Taille de bloc: %i octets\n" #: src/partclone.c:1062 #, fuzzy, c-format msgid "Partclone successfully checked the image (%s)\n" msgstr "Partclone a réussi à auditer l'image (%s)\n" #: src/partclone.c:1064 #, c-format msgid "Partclone successfully cloned the device (%s) to the image (%s)\n" msgstr "Partclone a réussi à cloner le périphérique (%s) vers l'image (%s)\n" #: src/partclone.c:1066 #, c-format msgid "Partclone successfully restored the image (%s) to the device (%s)\n" msgstr "" "Partclone a réussi à restaurer l'image (%s) vers le périphérique (%s)\n" #: src/partclone.c:1068 #, c-format msgid "Partclone successfully cloned the device (%s) to the device (%s)\n" msgstr "" "Partclone a réussi à cloner le périphérique (%s) vers le périphérique (%s)\n" #: src/partclone.c:1070 #, fuzzy, c-format msgid "Partclone successfully mapped the device (%s) to the domain log (%s)\n" msgstr "Partclone a réussi à cloner le périphérique (%s) vers l'image (%s)\n" #~ msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed:%6.2f%%, Seeking...," #~ msgstr "\r%80c\rEcoulé: %s, Restant: %s, Complété:%6.2f%%, Recherche...," #~ msgid "" #~ "\r%80c\rElapsed: %s, Remaining: %s, Completed:%6.2f%%, Rate: %6.2f%s/min," #~ msgstr "" #~ "\r%80c\rEcoulé: %s, Restant: %s, Complété:%6.2f%%, Débit: %6.2f%s/mn," #~ msgid " " #~ msgstr " " #~ msgid "Elapsed: %s" #~ msgstr "Ecoulé: %s" #~ msgid "Remaining: %s" #~ msgstr "Restant: %s" #~ msgid "Total Time: %s" #~ msgstr "Durée totale: %s" #~ msgid "Remaining: 0" #~ msgstr "Restant: 0" #~ msgid "" #~ " Elapsed: %s\n" #~ " Remaining: %s\n" #~ " Completed:%6.2f%%\n" #~ " Rate: %6.2f%s/min, " #~ msgstr "" #~ " Ecoulé: %s\n" #~ " Restant: %s\n" #~ " Complété:%6.2f%%\n" #~ " Débit: %6.2f%s/min, " #~ msgid "" #~ " Total Time: %s\n" #~ " Ave. Rate: %6.1f%s/min\n" #~ " 100.00%% completed!\n" #~ msgstr "" #~ " Durée totale: %s\n" #~ " Débit moyen: %6.1f%s/min\n" #~ " 100.00%% d'achèvement!\n" #~ msgid "" #~ " Total Time: %s\n" #~ " 100.00%% completed!\n" #~ msgstr "" #~ " Durée totale: %s\n" #~ " 100.00%% d'achèvement!\n" #~ msgid "Used block : %lli\n" #~ msgstr "Blocs utilisés : %lli\n" partclone-0.2.51/po/insert-header.sin000066400000000000000000000012401200565264100174470ustar00rootroot00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } partclone-0.2.51/po/partclone.pot000066400000000000000000000061321200565264100167220ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR thomas@nchc.org.tw # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: thomas@nchc.org.tw\n" "POT-Creation-Date: 2012-07-31 10:38+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/progress.c:197 #, c-format msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed: %6.2f%%" msgstr "" #: src/progress.c:200 #, c-format msgid ", %6.2f%s/min," msgstr "" #: src/progress.c:208 #, c-format msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed: 100.00%%" msgstr "" #: src/progress.c:210 #, c-format msgid ", Rate: %6.2f%s/min," msgstr "" #: src/progress.c:214 #, c-format msgid "" "\n" "Total Time: %s, " msgstr "" #: src/progress.c:216 #, c-format msgid "Ave. Rate: %6.1f%s/min, " msgstr "" #: src/progress.c:217 #, c-format msgid "%s" msgstr "" #: src/progress.c:242 #, c-format msgid "Elapsed: %s Remaining: %s " msgstr "" #: src/progress.c:244 #, c-format msgid "Rate: %6.2f%s/min" msgstr "" #: src/progress.c:246 #, c-format msgid "Current Block: %lld Total Block: %lld " msgstr "" #: src/progress.c:277 #, c-format msgid "Total Time: %s Remaining: %s " msgstr "" #: src/progress.c:279 #, c-format msgid "Ave. Rate: %6.2f%s/min" msgstr "" #: src/partclone.c:1010 #, c-format msgid "Partclone v%s http://partclone.org\n" msgstr "" #: src/partclone.c:1012 #, c-format msgid "Starting to check image (%s)\n" msgstr "" #: src/partclone.c:1014 #, c-format msgid "Starting to clone device (%s) to image (%s)\n" msgstr "" #: src/partclone.c:1016 #, c-format msgid "Starting to restore image (%s) to device (%s)\n" msgstr "" #: src/partclone.c:1018 #, c-format msgid "Starting to back up device(%s) to device(%s)\n" msgstr "" #: src/partclone.c:1020 #, c-format msgid "Starting to map device (%s) to domain log (%s)\n" msgstr "" #: src/partclone.c:1038 #, c-format msgid "File system: %s\n" msgstr "" #: src/partclone.c:1041 #, c-format msgid "Device size: %s = %lld Blocks\n" msgstr "" #: src/partclone.c:1044 #, c-format msgid "Space in use: %s = %lld Blocks\n" msgstr "" #: src/partclone.c:1047 #, c-format msgid "Free Space: %s = %lld Blocks\n" msgstr "" #: src/partclone.c:1049 #, c-format msgid "Block size: %i Byte\n" msgstr "" #: src/partclone.c:1062 #, c-format msgid "Partclone successfully checked the image (%s)\n" msgstr "" #: src/partclone.c:1064 #, c-format msgid "Partclone successfully cloned the device (%s) to the image (%s)\n" msgstr "" #: src/partclone.c:1066 #, c-format msgid "Partclone successfully restored the image (%s) to the device (%s)\n" msgstr "" #: src/partclone.c:1068 #, c-format msgid "Partclone successfully cloned the device (%s) to the device (%s)\n" msgstr "" #: src/partclone.c:1070 #, c-format msgid "Partclone successfully mapped the device (%s) to the domain log (%s)\n" msgstr "" partclone-0.2.51/po/quot.sed000066400000000000000000000002311200565264100156660ustar00rootroot00000000000000s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g partclone-0.2.51/po/remove-potcdate.sin000066400000000000000000000006601200565264100200200ustar00rootroot00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } partclone-0.2.51/po/stamp-po000066400000000000000000000000121200565264100156610ustar00rootroot00000000000000timestamp partclone-0.2.51/po/zh_TW.gmo000066400000000000000000000026661200565264100157560ustar00rootroot00000000000000Þ• |Ü !36MA_@¡Bâ-%S,q.žwÍEZ]z-Œ-º-è)@,\,‰    Total Time: %s, %sBlock size: %i Byte File system: %s Partclone successfully cloned the device (%s) to the device (%s) Partclone successfully cloned the device (%s) to the image (%s) Partclone successfully restored the image (%s) to the device (%s) Starting to back up device(%s) to device(%s) Starting to check image (%s) Starting to clone device (%s) to image (%s) Starting to restore image (%s) to device (%s) Project-Id-Version: Partclone 0.0.4 Report-Msgid-Bugs-To: thomas@nchc.org.tw POT-Creation-Date: 2012-07-31 10:38+0800 PO-Revision-Date: 2007-11-01 11:35+0800 Last-Translator: Yu-Chin Tsai Language-Team: Chinese (traditional) Language: zh_TW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 全部時間:%s, %sè£ç½®å€å¡Šå¤§å°: %i Byte 檔案系統: %s 備份 è£ç½® (%s) 到 å°è±¡æª” (%s) å®Œæˆ å‚™ä»½ è£ç½® (%s) 到 å°è±¡æª” (%s) å®Œæˆ é‚„åŽŸ å°è±¡æª” (%s) 到 è£ç½® (%s) å®Œæˆ é–‹å§‹å‚™ä»½ è£ç½® (%s) 到 è£ç½® (%s) 開始檢查å°è±¡æª” (%s) 開始備份 è£ç½® (%s) 到 å°è±¡æª” (%s) 開始還原 å°è±¡æª” (%s) 到 è£ç½® (%s) partclone-0.2.51/po/zh_TW.po000066400000000000000000000075711200565264100156120ustar00rootroot00000000000000# Chinese translations for Partclone package. # Copyright (C) 2007 thomas@nchc.org.tw # This file is distributed under the same license as the Partclone package. # Yu-Chin Tsai , 2007. # msgid "" msgstr "" "Project-Id-Version: Partclone 0.2.51\n" "Report-Msgid-Bugs-To: thomas@nchc.org.tw\n" "POT-Creation-Date: 2012-07-31 10:38+0800\n" "PO-Revision-Date: 2007-11-01 11:35+0800\n" "Last-Translator: Yu-Chin Tsai \n" "Language-Team: Chinese (traditional) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/progress.c:197 msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed: %6.2f%%" msgstr "\r%80c\rç¶“éŽï¼š%s, 剩餘: %s, 完æˆï¼š%6.2f%%" #: src/progress.c:200 msgid ", %6.2f%s/min," msgstr ", %6.2f%s/min," #: src/progress.c:208 msgid "\r%80c\rElapsed: %s, Remaining: %s, Completed: 100.00%%" msgstr "\r%80c\rç¶“éŽï¼š%s, 剩餘: %s, 完æˆï¼š100.00%%" #: src/progress.c:210 msgid ", Rate: %6.2f%s/min," msgstr ", 速率:%6.2f%s/min" #: src/progress.c:214 #, c-format msgid "" "\n" "Total Time: %s, " msgstr "" "\n" "全部時間:%s, " #: src/progress.c:216 msgid "Ave. Rate: %6.1f%s/min, " msgstr "å¹³å‡é€ŸçŽ‡ï¼š%6.1f%s/min, " #: src/progress.c:217 #, c-format msgid "%s" msgstr "%s" #: src/progress.c:242 msgid "Elapsed: %s Remaining: %s " msgstr "ç¶“éŽï¼š%s 剩餘: %s " #: src/progress.c:244 msgid "Rate: %6.2f%s/min" msgstr "速率:%6.2f%s/min" #: src/progress.c:246 #, c-format msgid "Current Block: %lld Total Block: %lld " msgstr "ç›®å‰å€å¡Š: %lld 全部å€å¡Š %lld " #: src/progress.c:277 msgid "Total Time: %s Remaining: %s " msgstr "全部時間:%s 剩餘時間: %s " #: src/progress.c:279 msgid "Ave. Rate: %6.2f%s/min" msgstr "å¹³å‡é€ŸçŽ‡ï¼š%6.2f%s/min" #: src/partclone.c:1010 #, c-format msgid "Partclone v%s http://partclone.org\n" msgstr "" #: src/partclone.c:1012 #, c-format msgid "Starting to check image (%s)\n" msgstr "開始檢查å°è±¡æª” (%s)\n" #: src/partclone.c:1014 #, c-format msgid "Starting to clone device (%s) to image (%s)\n" msgstr "開始備份 è£ç½® (%s) 到 å°è±¡æª” (%s)\n" #: src/partclone.c:1016 #, c-format msgid "Starting to restore image (%s) to device (%s)\n" msgstr "開始還原 å°è±¡æª” (%s) 到 è£ç½® (%s)\n" #: src/partclone.c:1018 #, c-format msgid "Starting to back up device(%s) to device(%s)\n" msgstr "開始備份 è£ç½® (%s) 到 è£ç½® (%s)\n" #: src/partclone.c:1020 msgid "Starting to map device (%s) to domain log (%s)\n" msgstr "開始輸出 è£ç½® (%s)å€å¡Š 到 資料檔 (%s)\n" #: src/partclone.c:1038 #, c-format msgid "File system: %s\n" msgstr "檔案系統: %s\n" #: src/partclone.c:1041 msgid "Device size: %s = %lld Blocks\n" msgstr "è£ç½®å¤§å°: %s = %lld Blocks\n" #: src/partclone.c:1044 msgid "Space in use: %s = %lld Blocks\n" msgstr "è£ç½®ä½¿ç”¨åˆ°ç©ºé–“: %s = %lld Blocks\n" #: src/partclone.c:1047 msgid "Free Space: %s = %lld Blocks\n" msgstr "剩餘空間: %s = %lld Blocks\n" #: src/partclone.c:1049 #, c-format msgid "Block size: %i Byte\n" msgstr "è£ç½®å€å¡Šå¤§å°: %i Byte\n" #: src/partclone.c:1062 msgid "Partclone successfully checked the image (%s)\n" msgstr "檢查å°è±¡æª” (%s) 完æˆ\n" #: src/partclone.c:1064 #, c-format msgid "Partclone successfully cloned the device (%s) to the image (%s)\n" msgstr "備份 è£ç½® (%s) 到 å°è±¡æª” (%s) 完æˆ\n" #: src/partclone.c:1066 #, c-format msgid "Partclone successfully restored the image (%s) to the device (%s)\n" msgstr "還原 å°è±¡æª” (%s) 到 è£ç½® (%s) 完æˆ\n" #: src/partclone.c:1068 #, c-format msgid "Partclone successfully cloned the device (%s) to the device (%s)\n" msgstr "備份 è£ç½® (%s) 到 è£ç½® (%s) 完æˆ\n" #: src/partclone.c:1070 msgid "Partclone successfully mapped the device (%s) to the domain log (%s)\n" msgstr "輸出è£ç½® (%s) å€å¡Šè³‡è¨Š 到 資料檔 (%s) 完æˆ\n" partclone-0.2.51/src/000077500000000000000000000000001200565264100143565ustar00rootroot00000000000000partclone-0.2.51/src/Makefile.am000066400000000000000000000154431200565264100164210ustar00rootroot00000000000000AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" LDADD = $(LIBINTL) sbin_PROGRAMS=partclone.info partclone.dd partclone.restore partclone.chkimg TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox BTRFS_SOURCE= btrfs/crc32c.c btrfs/disk-io.c btrfs/extent-tree.c btrfs/inode-map.c btrfs/rbtree.c btrfs/volumes.c btrfs/ctree.c btrfs/extent-cache.c btrfs/file-item.c btrfs/print-tree.c btrfs/root-tree.c btrfs/dir-item.c btrfs/extent_io.c btrfs/inode-item.c btrfs/radix-tree.c btrfs/utils.c btrfs/crc32c.h btrfs/extent-cache.h btrfs/ioctl.h btrfs/print-tree.h btrfs/transaction.h btrfs/volumes.h btrfs/ctree.h btrfs/extent_io.h btrfs/kerncompat.h btrfs/radix-tree.h btrfs/utils.h btrfs/disk-io.h btrfs/hash.h btrfs/list.h btrfs/rbtree.h btrfs/version.h EXFATFS_SOURCE= exfat/byteorder.h exfat/cluster.c exfat/exfatfs.h exfat/exfat.h exfat/io.c exfat/libexfat.a exfat/log.c exfat/lookup.c exfat/mount.c exfat/node.c exfat/time.c exfat/utf.c exfat/utils.c exfat/version.h if ENABLE_STATIC LDFLAGS+=-static endif if ENABLE_TINFO LIBS+=-ltinfo endif if ENABLE_MEMTRACE CFLAGS+=-DMEMTRACE -DMEMWATCH -DMW_STDIO endif if ENABLE_NCURSESW CFLAGS+=-I/usr/include/ncursesw endif version.h: FORCE $(TOOLBOX) --update-version partclone_info_SOURCES=infoclone.c partclone.c partclone.h fs_common.h partclone_restore_SOURCES=partclone.c partclone.h progress.c progress.h gettext.h restore.c partclone_restore_CFLAGS=-DRESTORE partclone_chkimg_SOURCES=partclone.c partclone.h progress.c progress.h gettext.h chkimg.c partclone_dd_SOURCES=partclone.c partclone.h progress.c progress.h gettext.h ddclone.c if ENABLE_EXTFS sbin_PROGRAMS += partclone.extfs partclone_extfs_SOURCES=main.c partclone.c progress.c extfsclone.c extfsclone.h partclone.h progress.h gettext.h partclone_extfs_CFLAGS=-DEXTFS partclone_extfs_LDADD=-lext2fs -lcom_err -lpthread endif if ENABLE_REISERFS sbin_PROGRAMS += partclone.reiserfs partclone_reiserfs_SOURCES=main.c partclone.c progress.c reiserfsclone.c reiserfsclone.h partclone.h progress.h gettext.h partclone_reiserfs_CFLAGS=-DREISERFS partclone_reiserfs_LDADD=-lreiserfs -ldal endif if ENABLE_REISER4 sbin_PROGRAMS += partclone.reiser4 partclone_reiser4_SOURCES=main.c partclone.c progress.c reiser4clone.c reiser4clone.h partclone.h progress.h gettext.h partclone_reiser4_CFLAGS=-DREISER4 partclone_reiser4_LDADD=-lreiser4 -laal endif if ENABLE_HFSP sbin_PROGRAMS += partclone.hfsp partclone_hfsp_SOURCES=main.c partclone.c progress.c hfsplusclone.c hfsplusclone.h partclone.h progress.h gettext.h partclone_hfsp_CFLAGS=-DHFSPLUS endif if ENABLE_XFS sbin_PROGRAMS += partclone.xfs partclone_xfs_SOURCES=main.c partclone.c progress.c xfsclone.c xfsclone.h partclone.h progress.h gettext.h partclone_xfs_CFLAGS=-DXFS -D_FILE_OFFSET_BITS=64 partclone_xfs_LDFLAGS= partclone_xfs_LDADD=-lxfs -lrt -lpthread endif if ENABLE_EXFAT sbin_PROGRAMS += partclone.exfat partclone_exfat_SOURCES=main.c partclone.c progress.c exfatclone.c exfatclone.h partclone.h progress.h gettext.h $(EXFATFS_SOURCE) partclone_exfat_CFLAGS=-DEXFAT -D_FILE_OFFSET_BITS=64 endif if ENABLE_FAT sbin_PROGRAMS += partclone.fat partclone_fat_SOURCES=main.c partclone.c progress.c fatclone.c fatclone.h partclone.h progress.h gettext.h partclone_fat_CFLAGS=-DFAT endif sbin_PROGRAMS += partclone.ntfsfixboot partclone_ntfsfixboot_SOURCES=ntfsfixboot.c if ENABLE_NTFS sbin_PROGRAMS += partclone.ntfs partclone_ntfs_SOURCES=main.c partclone.c progress.c ntfsclone-ng.c ntfsclone-ng.h partclone.h progress.h gettext.h if ENABLE_NTFS_3G partclone_ntfs_CFLAGS=-DNTFS3G partclone_ntfs_LDADD=-lntfs-3g else partclone_ntfs_CFLAGS=-DNTFS partclone_ntfs_LDADD=-lntfs endif endif if ENABLE_UFS sbin_PROGRAMS += partclone.ufs partclone_ufs_SOURCES=main.c partclone.c progress.c ufsclone.c ufsclone.h partclone.h progress.h gettext.h partclone_ufs_CFLAGS=-DUFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 partclone_ufs_LDADD=-lufs -lbsd endif if ENABLE_VMFS sbin_PROGRAMS += partclone.vmfs partclone_vmfs_SOURCES=main.c partclone.c progress.c vmfsclone.c vmfsclone.h partclone.h progress.h gettext.h partclone_vmfs_CFLAGS=-DVMFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(UUID_CFLAGS) partclone_vmfs_LDADD=-lvmfs -luuid sbin_PROGRAMS += partclone.vmfs5 partclone_vmfs5_SOURCES=main.c partclone.c progress.c vmfs5clone.c vmfsclone.h partclone.h progress.h gettext.h partclone_vmfs5_CFLAGS=-DVMFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(UUID_CFLAGS) partclone_vmfs5_LDADD=-lvmfs -luuid sbin_PROGRAMS += partclone.fstype partclone_fstype_SOURCES=fstype.c partclone_fstype_CFLAGS=-DVMFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(UUID_CFLAGS) partclone_fstype_LDADD=-lvmfs -luuid endif if ENABLE_JFS sbin_PROGRAMS += partclone.jfs #partclone_jfs_SOURCES=main.c partclone.c progress.c jfs_devices.c jfs_devices.h jfsclone.c jfsclone.h partclone.h progress.h gettext.h partclone_jfs_SOURCES=main.c partclone.c progress.c jfsclone.c jfsclone.h partclone.h progress.h gettext.h partclone_jfs_CFLAGS=-DJFS partclone_jfs_LDADD=-luuid -ljfs endif if ENABLE_BTRFS sbin_PROGRAMS += partclone.btrfs partclone_btrfs_SOURCES=main.c partclone.c progress.c btrfsclone.c btrfsclone.h partclone.h progress.h gettext.h $(BTRFS_SOURCE) partclone_btrfs_CFLAGS=-DBTRFS -D_FILE_OFFSET_BITS=64 partclone_btrfs_LDADD=-luuid endif # Extra install-exec-hook: if ENABLE_EXTFS $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext2 $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext3 $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext4 $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext4dev endif if ENABLE_HFSP $(LN_S) -f partclone.hfsp $(DESTDIR)$(sbindir)/partclone.hfs+ $(LN_S) -f partclone.hfsp $(DESTDIR)$(sbindir)/partclone.hfsplus endif if ENABLE_NTFS $(LN_S) -f partclone.ntfsfixboot $(DESTDIR)$(sbindir)/partclone.ntfsreloc endif if ENABLE_FAT $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.fat12 $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.fat16 $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.fat32 $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.vfat endif if ENABLE_VMFS $(LN_S) -f partclone.vmfs $(DESTDIR)$(sbindir)/partclone.VMFS_volume_member $(LN_S) -f partclone.vmfs $(DESTDIR)$(sbindir)/partclone.vmfs3 # $(LN_S) -f partclone.vmfs $(DESTDIR)$(sbindir)/partclone.vmfs5 endif uninstall-local: if ENABLE_EXTFS $(RM) -f $(sbindir)/partclone.ext4dev $(RM) -f $(sbindir)/partclone.ext4 $(RM) -f $(sbindir)/partclone.ext3 $(RM) -f $(sbindir)/partclone.ext2 endif if ENABLE_HFSP $(RM) -f $(sbindir)/partclone.hfs+ $(RM) -f $(sbindir)/partclone.hfsplus endif if ENABLE_FAT $(RM) -f $(sbindir)/partclone.fat12 $(RM) -f $(sbindir)/partclone.fat16 $(RM) -f $(sbindir)/partclone.fat32 $(RM) -f $(sbindir)/partclone.vfat endif if ENABLE_NTFS $(RM) -f $(sbindir)/partclone.ntfsreloc endif if ENABLE_VMFS $(RM) -f $(sbindir)/partclone.VMFS_volume_member endif FORCE: partclone-0.2.51/src/Makefile.in000066400000000000000000006040041200565264100164270ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 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 = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = partclone.info$(EXEEXT) partclone.dd$(EXEEXT) \ partclone.restore$(EXEEXT) partclone.chkimg$(EXEEXT) \ $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ $(am__EXEEXT_7) partclone.ntfsfixboot$(EXEEXT) $(am__EXEEXT_8) \ $(am__EXEEXT_9) $(am__EXEEXT_10) $(am__EXEEXT_11) \ $(am__EXEEXT_12) @ENABLE_STATIC_TRUE@am__append_1 = -static @ENABLE_TINFO_TRUE@am__append_2 = -ltinfo @ENABLE_MEMTRACE_TRUE@am__append_3 = -DMEMTRACE -DMEMWATCH -DMW_STDIO @ENABLE_NCURSESW_TRUE@am__append_4 = -I/usr/include/ncursesw @ENABLE_EXTFS_TRUE@am__append_5 = partclone.extfs @ENABLE_REISERFS_TRUE@am__append_6 = partclone.reiserfs @ENABLE_REISER4_TRUE@am__append_7 = partclone.reiser4 @ENABLE_HFSP_TRUE@am__append_8 = partclone.hfsp @ENABLE_XFS_TRUE@am__append_9 = partclone.xfs @ENABLE_EXFAT_TRUE@am__append_10 = partclone.exfat @ENABLE_FAT_TRUE@am__append_11 = partclone.fat @ENABLE_NTFS_TRUE@am__append_12 = partclone.ntfs @ENABLE_UFS_TRUE@am__append_13 = partclone.ufs @ENABLE_VMFS_TRUE@am__append_14 = partclone.vmfs partclone.vmfs5 \ @ENABLE_VMFS_TRUE@ partclone.fstype @ENABLE_JFS_TRUE@am__append_15 = partclone.jfs @ENABLE_BTRFS_TRUE@am__append_16 = partclone.btrfs subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @ENABLE_EXTFS_TRUE@am__EXEEXT_1 = partclone.extfs$(EXEEXT) @ENABLE_REISERFS_TRUE@am__EXEEXT_2 = partclone.reiserfs$(EXEEXT) @ENABLE_REISER4_TRUE@am__EXEEXT_3 = partclone.reiser4$(EXEEXT) @ENABLE_HFSP_TRUE@am__EXEEXT_4 = partclone.hfsp$(EXEEXT) @ENABLE_XFS_TRUE@am__EXEEXT_5 = partclone.xfs$(EXEEXT) @ENABLE_EXFAT_TRUE@am__EXEEXT_6 = partclone.exfat$(EXEEXT) @ENABLE_FAT_TRUE@am__EXEEXT_7 = partclone.fat$(EXEEXT) @ENABLE_NTFS_TRUE@am__EXEEXT_8 = partclone.ntfs$(EXEEXT) @ENABLE_UFS_TRUE@am__EXEEXT_9 = partclone.ufs$(EXEEXT) @ENABLE_VMFS_TRUE@am__EXEEXT_10 = partclone.vmfs$(EXEEXT) \ @ENABLE_VMFS_TRUE@ partclone.vmfs5$(EXEEXT) \ @ENABLE_VMFS_TRUE@ partclone.fstype$(EXEEXT) @ENABLE_JFS_TRUE@am__EXEEXT_11 = partclone.jfs$(EXEEXT) @ENABLE_BTRFS_TRUE@am__EXEEXT_12 = partclone.btrfs$(EXEEXT) am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am__partclone_btrfs_SOURCES_DIST = main.c partclone.c progress.c \ btrfsclone.c btrfsclone.h partclone.h progress.h gettext.h \ btrfs/crc32c.c btrfs/disk-io.c btrfs/extent-tree.c \ btrfs/inode-map.c btrfs/rbtree.c btrfs/volumes.c btrfs/ctree.c \ btrfs/extent-cache.c btrfs/file-item.c btrfs/print-tree.c \ btrfs/root-tree.c btrfs/dir-item.c btrfs/extent_io.c \ btrfs/inode-item.c btrfs/radix-tree.c btrfs/utils.c \ btrfs/crc32c.h btrfs/extent-cache.h btrfs/ioctl.h \ btrfs/print-tree.h btrfs/transaction.h btrfs/volumes.h \ btrfs/ctree.h btrfs/extent_io.h btrfs/kerncompat.h \ btrfs/radix-tree.h btrfs/utils.h btrfs/disk-io.h btrfs/hash.h \ btrfs/list.h btrfs/rbtree.h btrfs/version.h am__objects_1 = partclone_btrfs-crc32c.$(OBJEXT) \ partclone_btrfs-disk-io.$(OBJEXT) \ partclone_btrfs-extent-tree.$(OBJEXT) \ partclone_btrfs-inode-map.$(OBJEXT) \ partclone_btrfs-rbtree.$(OBJEXT) \ partclone_btrfs-volumes.$(OBJEXT) \ partclone_btrfs-ctree.$(OBJEXT) \ partclone_btrfs-extent-cache.$(OBJEXT) \ partclone_btrfs-file-item.$(OBJEXT) \ partclone_btrfs-print-tree.$(OBJEXT) \ partclone_btrfs-root-tree.$(OBJEXT) \ partclone_btrfs-dir-item.$(OBJEXT) \ partclone_btrfs-extent_io.$(OBJEXT) \ partclone_btrfs-inode-item.$(OBJEXT) \ partclone_btrfs-radix-tree.$(OBJEXT) \ partclone_btrfs-utils.$(OBJEXT) @ENABLE_BTRFS_TRUE@am_partclone_btrfs_OBJECTS = \ @ENABLE_BTRFS_TRUE@ partclone_btrfs-main.$(OBJEXT) \ @ENABLE_BTRFS_TRUE@ partclone_btrfs-partclone.$(OBJEXT) \ @ENABLE_BTRFS_TRUE@ partclone_btrfs-progress.$(OBJEXT) \ @ENABLE_BTRFS_TRUE@ partclone_btrfs-btrfsclone.$(OBJEXT) \ @ENABLE_BTRFS_TRUE@ $(am__objects_1) partclone_btrfs_OBJECTS = $(am_partclone_btrfs_OBJECTS) partclone_btrfs_DEPENDENCIES = partclone_btrfs_LINK = $(CCLD) $(partclone_btrfs_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_partclone_chkimg_OBJECTS = partclone.$(OBJEXT) progress.$(OBJEXT) \ chkimg.$(OBJEXT) partclone_chkimg_OBJECTS = $(am_partclone_chkimg_OBJECTS) partclone_chkimg_LDADD = $(LDADD) am__DEPENDENCIES_1 = partclone_chkimg_DEPENDENCIES = $(am__DEPENDENCIES_1) am_partclone_dd_OBJECTS = partclone.$(OBJEXT) progress.$(OBJEXT) \ ddclone.$(OBJEXT) partclone_dd_OBJECTS = $(am_partclone_dd_OBJECTS) partclone_dd_LDADD = $(LDADD) partclone_dd_DEPENDENCIES = $(am__DEPENDENCIES_1) am__partclone_exfat_SOURCES_DIST = main.c partclone.c progress.c \ exfatclone.c exfatclone.h partclone.h progress.h gettext.h \ exfat/byteorder.h exfat/cluster.c exfat/exfatfs.h \ exfat/exfat.h exfat/io.c exfat/libexfat.a exfat/log.c \ exfat/lookup.c exfat/mount.c exfat/node.c exfat/time.c \ exfat/utf.c exfat/utils.c exfat/version.h am__objects_2 = partclone_exfat-cluster.$(OBJEXT) \ partclone_exfat-io.$(OBJEXT) partclone_exfat-log.$(OBJEXT) \ partclone_exfat-lookup.$(OBJEXT) \ partclone_exfat-mount.$(OBJEXT) partclone_exfat-node.$(OBJEXT) \ partclone_exfat-time.$(OBJEXT) partclone_exfat-utf.$(OBJEXT) \ partclone_exfat-utils.$(OBJEXT) @ENABLE_EXFAT_TRUE@am_partclone_exfat_OBJECTS = \ @ENABLE_EXFAT_TRUE@ partclone_exfat-main.$(OBJEXT) \ @ENABLE_EXFAT_TRUE@ partclone_exfat-partclone.$(OBJEXT) \ @ENABLE_EXFAT_TRUE@ partclone_exfat-progress.$(OBJEXT) \ @ENABLE_EXFAT_TRUE@ partclone_exfat-exfatclone.$(OBJEXT) \ @ENABLE_EXFAT_TRUE@ $(am__objects_2) partclone_exfat_OBJECTS = $(am_partclone_exfat_OBJECTS) partclone_exfat_LDADD = $(LDADD) partclone_exfat_DEPENDENCIES = $(am__DEPENDENCIES_1) partclone_exfat_LINK = $(CCLD) $(partclone_exfat_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_extfs_SOURCES_DIST = main.c partclone.c progress.c \ extfsclone.c extfsclone.h partclone.h progress.h gettext.h @ENABLE_EXTFS_TRUE@am_partclone_extfs_OBJECTS = \ @ENABLE_EXTFS_TRUE@ partclone_extfs-main.$(OBJEXT) \ @ENABLE_EXTFS_TRUE@ partclone_extfs-partclone.$(OBJEXT) \ @ENABLE_EXTFS_TRUE@ partclone_extfs-progress.$(OBJEXT) \ @ENABLE_EXTFS_TRUE@ partclone_extfs-extfsclone.$(OBJEXT) partclone_extfs_OBJECTS = $(am_partclone_extfs_OBJECTS) partclone_extfs_DEPENDENCIES = partclone_extfs_LINK = $(CCLD) $(partclone_extfs_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_fat_SOURCES_DIST = main.c partclone.c progress.c \ fatclone.c fatclone.h partclone.h progress.h gettext.h @ENABLE_FAT_TRUE@am_partclone_fat_OBJECTS = \ @ENABLE_FAT_TRUE@ partclone_fat-main.$(OBJEXT) \ @ENABLE_FAT_TRUE@ partclone_fat-partclone.$(OBJEXT) \ @ENABLE_FAT_TRUE@ partclone_fat-progress.$(OBJEXT) \ @ENABLE_FAT_TRUE@ partclone_fat-fatclone.$(OBJEXT) partclone_fat_OBJECTS = $(am_partclone_fat_OBJECTS) partclone_fat_LDADD = $(LDADD) partclone_fat_DEPENDENCIES = $(am__DEPENDENCIES_1) partclone_fat_LINK = $(CCLD) $(partclone_fat_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_fstype_SOURCES_DIST = fstype.c @ENABLE_VMFS_TRUE@am_partclone_fstype_OBJECTS = \ @ENABLE_VMFS_TRUE@ partclone_fstype-fstype.$(OBJEXT) partclone_fstype_OBJECTS = $(am_partclone_fstype_OBJECTS) partclone_fstype_DEPENDENCIES = partclone_fstype_LINK = $(CCLD) $(partclone_fstype_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_hfsp_SOURCES_DIST = main.c partclone.c progress.c \ hfsplusclone.c hfsplusclone.h partclone.h progress.h gettext.h @ENABLE_HFSP_TRUE@am_partclone_hfsp_OBJECTS = \ @ENABLE_HFSP_TRUE@ partclone_hfsp-main.$(OBJEXT) \ @ENABLE_HFSP_TRUE@ partclone_hfsp-partclone.$(OBJEXT) \ @ENABLE_HFSP_TRUE@ partclone_hfsp-progress.$(OBJEXT) \ @ENABLE_HFSP_TRUE@ partclone_hfsp-hfsplusclone.$(OBJEXT) partclone_hfsp_OBJECTS = $(am_partclone_hfsp_OBJECTS) partclone_hfsp_LDADD = $(LDADD) partclone_hfsp_DEPENDENCIES = $(am__DEPENDENCIES_1) partclone_hfsp_LINK = $(CCLD) $(partclone_hfsp_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_partclone_info_OBJECTS = infoclone.$(OBJEXT) partclone.$(OBJEXT) partclone_info_OBJECTS = $(am_partclone_info_OBJECTS) partclone_info_LDADD = $(LDADD) partclone_info_DEPENDENCIES = $(am__DEPENDENCIES_1) am__partclone_jfs_SOURCES_DIST = main.c partclone.c progress.c \ jfsclone.c jfsclone.h partclone.h progress.h gettext.h @ENABLE_JFS_TRUE@am_partclone_jfs_OBJECTS = \ @ENABLE_JFS_TRUE@ partclone_jfs-main.$(OBJEXT) \ @ENABLE_JFS_TRUE@ partclone_jfs-partclone.$(OBJEXT) \ @ENABLE_JFS_TRUE@ partclone_jfs-progress.$(OBJEXT) \ @ENABLE_JFS_TRUE@ partclone_jfs-jfsclone.$(OBJEXT) partclone_jfs_OBJECTS = $(am_partclone_jfs_OBJECTS) partclone_jfs_DEPENDENCIES = partclone_jfs_LINK = $(CCLD) $(partclone_jfs_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_ntfs_SOURCES_DIST = main.c partclone.c progress.c \ ntfsclone-ng.c ntfsclone-ng.h partclone.h progress.h gettext.h @ENABLE_NTFS_TRUE@am_partclone_ntfs_OBJECTS = \ @ENABLE_NTFS_TRUE@ partclone_ntfs-main.$(OBJEXT) \ @ENABLE_NTFS_TRUE@ partclone_ntfs-partclone.$(OBJEXT) \ @ENABLE_NTFS_TRUE@ partclone_ntfs-progress.$(OBJEXT) \ @ENABLE_NTFS_TRUE@ partclone_ntfs-ntfsclone-ng.$(OBJEXT) partclone_ntfs_OBJECTS = $(am_partclone_ntfs_OBJECTS) partclone_ntfs_DEPENDENCIES = partclone_ntfs_LINK = $(CCLD) $(partclone_ntfs_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_partclone_ntfsfixboot_OBJECTS = ntfsfixboot.$(OBJEXT) partclone_ntfsfixboot_OBJECTS = $(am_partclone_ntfsfixboot_OBJECTS) partclone_ntfsfixboot_LDADD = $(LDADD) partclone_ntfsfixboot_DEPENDENCIES = $(am__DEPENDENCIES_1) am__partclone_reiser4_SOURCES_DIST = main.c partclone.c progress.c \ reiser4clone.c reiser4clone.h partclone.h progress.h gettext.h @ENABLE_REISER4_TRUE@am_partclone_reiser4_OBJECTS = \ @ENABLE_REISER4_TRUE@ partclone_reiser4-main.$(OBJEXT) \ @ENABLE_REISER4_TRUE@ partclone_reiser4-partclone.$(OBJEXT) \ @ENABLE_REISER4_TRUE@ partclone_reiser4-progress.$(OBJEXT) \ @ENABLE_REISER4_TRUE@ partclone_reiser4-reiser4clone.$(OBJEXT) partclone_reiser4_OBJECTS = $(am_partclone_reiser4_OBJECTS) partclone_reiser4_DEPENDENCIES = partclone_reiser4_LINK = $(CCLD) $(partclone_reiser4_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_reiserfs_SOURCES_DIST = main.c partclone.c progress.c \ reiserfsclone.c reiserfsclone.h partclone.h progress.h \ gettext.h @ENABLE_REISERFS_TRUE@am_partclone_reiserfs_OBJECTS = \ @ENABLE_REISERFS_TRUE@ partclone_reiserfs-main.$(OBJEXT) \ @ENABLE_REISERFS_TRUE@ partclone_reiserfs-partclone.$(OBJEXT) \ @ENABLE_REISERFS_TRUE@ partclone_reiserfs-progress.$(OBJEXT) \ @ENABLE_REISERFS_TRUE@ partclone_reiserfs-reiserfsclone.$(OBJEXT) partclone_reiserfs_OBJECTS = $(am_partclone_reiserfs_OBJECTS) partclone_reiserfs_DEPENDENCIES = partclone_reiserfs_LINK = $(CCLD) $(partclone_reiserfs_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_partclone_restore_OBJECTS = partclone_restore-partclone.$(OBJEXT) \ partclone_restore-progress.$(OBJEXT) \ partclone_restore-restore.$(OBJEXT) partclone_restore_OBJECTS = $(am_partclone_restore_OBJECTS) partclone_restore_LDADD = $(LDADD) partclone_restore_DEPENDENCIES = $(am__DEPENDENCIES_1) partclone_restore_LINK = $(CCLD) $(partclone_restore_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_ufs_SOURCES_DIST = main.c partclone.c progress.c \ ufsclone.c ufsclone.h partclone.h progress.h gettext.h @ENABLE_UFS_TRUE@am_partclone_ufs_OBJECTS = \ @ENABLE_UFS_TRUE@ partclone_ufs-main.$(OBJEXT) \ @ENABLE_UFS_TRUE@ partclone_ufs-partclone.$(OBJEXT) \ @ENABLE_UFS_TRUE@ partclone_ufs-progress.$(OBJEXT) \ @ENABLE_UFS_TRUE@ partclone_ufs-ufsclone.$(OBJEXT) partclone_ufs_OBJECTS = $(am_partclone_ufs_OBJECTS) partclone_ufs_DEPENDENCIES = partclone_ufs_LINK = $(CCLD) $(partclone_ufs_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_vmfs_SOURCES_DIST = main.c partclone.c progress.c \ vmfsclone.c vmfsclone.h partclone.h progress.h gettext.h @ENABLE_VMFS_TRUE@am_partclone_vmfs_OBJECTS = \ @ENABLE_VMFS_TRUE@ partclone_vmfs-main.$(OBJEXT) \ @ENABLE_VMFS_TRUE@ partclone_vmfs-partclone.$(OBJEXT) \ @ENABLE_VMFS_TRUE@ partclone_vmfs-progress.$(OBJEXT) \ @ENABLE_VMFS_TRUE@ partclone_vmfs-vmfsclone.$(OBJEXT) partclone_vmfs_OBJECTS = $(am_partclone_vmfs_OBJECTS) partclone_vmfs_DEPENDENCIES = partclone_vmfs_LINK = $(CCLD) $(partclone_vmfs_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_vmfs5_SOURCES_DIST = main.c partclone.c progress.c \ vmfs5clone.c vmfsclone.h partclone.h progress.h gettext.h @ENABLE_VMFS_TRUE@am_partclone_vmfs5_OBJECTS = \ @ENABLE_VMFS_TRUE@ partclone_vmfs5-main.$(OBJEXT) \ @ENABLE_VMFS_TRUE@ partclone_vmfs5-partclone.$(OBJEXT) \ @ENABLE_VMFS_TRUE@ partclone_vmfs5-progress.$(OBJEXT) \ @ENABLE_VMFS_TRUE@ partclone_vmfs5-vmfs5clone.$(OBJEXT) partclone_vmfs5_OBJECTS = $(am_partclone_vmfs5_OBJECTS) partclone_vmfs5_DEPENDENCIES = partclone_vmfs5_LINK = $(CCLD) $(partclone_vmfs5_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__partclone_xfs_SOURCES_DIST = main.c partclone.c progress.c \ xfsclone.c xfsclone.h partclone.h progress.h gettext.h @ENABLE_XFS_TRUE@am_partclone_xfs_OBJECTS = \ @ENABLE_XFS_TRUE@ partclone_xfs-main.$(OBJEXT) \ @ENABLE_XFS_TRUE@ partclone_xfs-partclone.$(OBJEXT) \ @ENABLE_XFS_TRUE@ partclone_xfs-progress.$(OBJEXT) \ @ENABLE_XFS_TRUE@ partclone_xfs-xfsclone.$(OBJEXT) partclone_xfs_OBJECTS = $(am_partclone_xfs_OBJECTS) partclone_xfs_DEPENDENCIES = partclone_xfs_LINK = $(CCLD) $(partclone_xfs_CFLAGS) $(CFLAGS) \ $(partclone_xfs_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(partclone_btrfs_SOURCES) $(partclone_chkimg_SOURCES) \ $(partclone_dd_SOURCES) $(partclone_exfat_SOURCES) \ $(partclone_extfs_SOURCES) $(partclone_fat_SOURCES) \ $(partclone_fstype_SOURCES) $(partclone_hfsp_SOURCES) \ $(partclone_info_SOURCES) $(partclone_jfs_SOURCES) \ $(partclone_ntfs_SOURCES) $(partclone_ntfsfixboot_SOURCES) \ $(partclone_reiser4_SOURCES) $(partclone_reiserfs_SOURCES) \ $(partclone_restore_SOURCES) $(partclone_ufs_SOURCES) \ $(partclone_vmfs_SOURCES) $(partclone_vmfs5_SOURCES) \ $(partclone_xfs_SOURCES) DIST_SOURCES = $(am__partclone_btrfs_SOURCES_DIST) \ $(partclone_chkimg_SOURCES) $(partclone_dd_SOURCES) \ $(am__partclone_exfat_SOURCES_DIST) \ $(am__partclone_extfs_SOURCES_DIST) \ $(am__partclone_fat_SOURCES_DIST) \ $(am__partclone_fstype_SOURCES_DIST) \ $(am__partclone_hfsp_SOURCES_DIST) $(partclone_info_SOURCES) \ $(am__partclone_jfs_SOURCES_DIST) \ $(am__partclone_ntfs_SOURCES_DIST) \ $(partclone_ntfsfixboot_SOURCES) \ $(am__partclone_reiser4_SOURCES_DIST) \ $(am__partclone_reiserfs_SOURCES_DIST) \ $(partclone_restore_SOURCES) $(am__partclone_ufs_SOURCES_DIST) \ $(am__partclone_vmfs_SOURCES_DIST) \ $(am__partclone_vmfs5_SOURCES_DIST) \ $(am__partclone_xfs_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ $(am__append_3) $(am__append_4) 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@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ $(am__append_1) LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ $(am__append_2) LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RM = @RM@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" LDADD = $(LIBINTL) TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox BTRFS_SOURCE = btrfs/crc32c.c btrfs/disk-io.c btrfs/extent-tree.c btrfs/inode-map.c btrfs/rbtree.c btrfs/volumes.c btrfs/ctree.c btrfs/extent-cache.c btrfs/file-item.c btrfs/print-tree.c btrfs/root-tree.c btrfs/dir-item.c btrfs/extent_io.c btrfs/inode-item.c btrfs/radix-tree.c btrfs/utils.c btrfs/crc32c.h btrfs/extent-cache.h btrfs/ioctl.h btrfs/print-tree.h btrfs/transaction.h btrfs/volumes.h btrfs/ctree.h btrfs/extent_io.h btrfs/kerncompat.h btrfs/radix-tree.h btrfs/utils.h btrfs/disk-io.h btrfs/hash.h btrfs/list.h btrfs/rbtree.h btrfs/version.h EXFATFS_SOURCE = exfat/byteorder.h exfat/cluster.c exfat/exfatfs.h exfat/exfat.h exfat/io.c exfat/libexfat.a exfat/log.c exfat/lookup.c exfat/mount.c exfat/node.c exfat/time.c exfat/utf.c exfat/utils.c exfat/version.h partclone_info_SOURCES = infoclone.c partclone.c partclone.h fs_common.h partclone_restore_SOURCES = partclone.c partclone.h progress.c progress.h gettext.h restore.c partclone_restore_CFLAGS = -DRESTORE partclone_chkimg_SOURCES = partclone.c partclone.h progress.c progress.h gettext.h chkimg.c partclone_dd_SOURCES = partclone.c partclone.h progress.c progress.h gettext.h ddclone.c @ENABLE_EXTFS_TRUE@partclone_extfs_SOURCES = main.c partclone.c progress.c extfsclone.c extfsclone.h partclone.h progress.h gettext.h @ENABLE_EXTFS_TRUE@partclone_extfs_CFLAGS = -DEXTFS @ENABLE_EXTFS_TRUE@partclone_extfs_LDADD = -lext2fs -lcom_err -lpthread @ENABLE_REISERFS_TRUE@partclone_reiserfs_SOURCES = main.c partclone.c progress.c reiserfsclone.c reiserfsclone.h partclone.h progress.h gettext.h @ENABLE_REISERFS_TRUE@partclone_reiserfs_CFLAGS = -DREISERFS @ENABLE_REISERFS_TRUE@partclone_reiserfs_LDADD = -lreiserfs -ldal @ENABLE_REISER4_TRUE@partclone_reiser4_SOURCES = main.c partclone.c progress.c reiser4clone.c reiser4clone.h partclone.h progress.h gettext.h @ENABLE_REISER4_TRUE@partclone_reiser4_CFLAGS = -DREISER4 @ENABLE_REISER4_TRUE@partclone_reiser4_LDADD = -lreiser4 -laal @ENABLE_HFSP_TRUE@partclone_hfsp_SOURCES = main.c partclone.c progress.c hfsplusclone.c hfsplusclone.h partclone.h progress.h gettext.h @ENABLE_HFSP_TRUE@partclone_hfsp_CFLAGS = -DHFSPLUS @ENABLE_XFS_TRUE@partclone_xfs_SOURCES = main.c partclone.c progress.c xfsclone.c xfsclone.h partclone.h progress.h gettext.h @ENABLE_XFS_TRUE@partclone_xfs_CFLAGS = -DXFS -D_FILE_OFFSET_BITS=64 @ENABLE_XFS_TRUE@partclone_xfs_LDFLAGS = @ENABLE_XFS_TRUE@partclone_xfs_LDADD = -lxfs -lrt -lpthread @ENABLE_EXFAT_TRUE@partclone_exfat_SOURCES = main.c partclone.c progress.c exfatclone.c exfatclone.h partclone.h progress.h gettext.h $(EXFATFS_SOURCE) @ENABLE_EXFAT_TRUE@partclone_exfat_CFLAGS = -DEXFAT -D_FILE_OFFSET_BITS=64 @ENABLE_FAT_TRUE@partclone_fat_SOURCES = main.c partclone.c progress.c fatclone.c fatclone.h partclone.h progress.h gettext.h @ENABLE_FAT_TRUE@partclone_fat_CFLAGS = -DFAT partclone_ntfsfixboot_SOURCES = ntfsfixboot.c @ENABLE_NTFS_TRUE@partclone_ntfs_SOURCES = main.c partclone.c progress.c ntfsclone-ng.c ntfsclone-ng.h partclone.h progress.h gettext.h @ENABLE_NTFS_3G_FALSE@@ENABLE_NTFS_TRUE@partclone_ntfs_CFLAGS = -DNTFS @ENABLE_NTFS_3G_TRUE@@ENABLE_NTFS_TRUE@partclone_ntfs_CFLAGS = -DNTFS3G @ENABLE_NTFS_3G_FALSE@@ENABLE_NTFS_TRUE@partclone_ntfs_LDADD = -lntfs @ENABLE_NTFS_3G_TRUE@@ENABLE_NTFS_TRUE@partclone_ntfs_LDADD = -lntfs-3g @ENABLE_UFS_TRUE@partclone_ufs_SOURCES = main.c partclone.c progress.c ufsclone.c ufsclone.h partclone.h progress.h gettext.h @ENABLE_UFS_TRUE@partclone_ufs_CFLAGS = -DUFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 @ENABLE_UFS_TRUE@partclone_ufs_LDADD = -lufs -lbsd @ENABLE_VMFS_TRUE@partclone_vmfs_SOURCES = main.c partclone.c progress.c vmfsclone.c vmfsclone.h partclone.h progress.h gettext.h @ENABLE_VMFS_TRUE@partclone_vmfs_CFLAGS = -DVMFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(UUID_CFLAGS) @ENABLE_VMFS_TRUE@partclone_vmfs_LDADD = -lvmfs -luuid @ENABLE_VMFS_TRUE@partclone_vmfs5_SOURCES = main.c partclone.c progress.c vmfs5clone.c vmfsclone.h partclone.h progress.h gettext.h @ENABLE_VMFS_TRUE@partclone_vmfs5_CFLAGS = -DVMFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(UUID_CFLAGS) @ENABLE_VMFS_TRUE@partclone_vmfs5_LDADD = -lvmfs -luuid @ENABLE_VMFS_TRUE@partclone_fstype_SOURCES = fstype.c @ENABLE_VMFS_TRUE@partclone_fstype_CFLAGS = -DVMFS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(UUID_CFLAGS) @ENABLE_VMFS_TRUE@partclone_fstype_LDADD = -lvmfs -luuid #partclone_jfs_SOURCES=main.c partclone.c progress.c jfs_devices.c jfs_devices.h jfsclone.c jfsclone.h partclone.h progress.h gettext.h @ENABLE_JFS_TRUE@partclone_jfs_SOURCES = main.c partclone.c progress.c jfsclone.c jfsclone.h partclone.h progress.h gettext.h @ENABLE_JFS_TRUE@partclone_jfs_CFLAGS = -DJFS @ENABLE_JFS_TRUE@partclone_jfs_LDADD = -luuid -ljfs @ENABLE_BTRFS_TRUE@partclone_btrfs_SOURCES = main.c partclone.c progress.c btrfsclone.c btrfsclone.h partclone.h progress.h gettext.h $(BTRFS_SOURCE) @ENABLE_BTRFS_TRUE@partclone_btrfs_CFLAGS = -DBTRFS -D_FILE_OFFSET_BITS=64 @ENABLE_BTRFS_TRUE@partclone_btrfs_LDADD = -luuid all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) partclone.btrfs$(EXEEXT): $(partclone_btrfs_OBJECTS) $(partclone_btrfs_DEPENDENCIES) @rm -f partclone.btrfs$(EXEEXT) $(partclone_btrfs_LINK) $(partclone_btrfs_OBJECTS) $(partclone_btrfs_LDADD) $(LIBS) partclone.chkimg$(EXEEXT): $(partclone_chkimg_OBJECTS) $(partclone_chkimg_DEPENDENCIES) @rm -f partclone.chkimg$(EXEEXT) $(LINK) $(partclone_chkimg_OBJECTS) $(partclone_chkimg_LDADD) $(LIBS) partclone.dd$(EXEEXT): $(partclone_dd_OBJECTS) $(partclone_dd_DEPENDENCIES) @rm -f partclone.dd$(EXEEXT) $(LINK) $(partclone_dd_OBJECTS) $(partclone_dd_LDADD) $(LIBS) partclone.exfat$(EXEEXT): $(partclone_exfat_OBJECTS) $(partclone_exfat_DEPENDENCIES) @rm -f partclone.exfat$(EXEEXT) $(partclone_exfat_LINK) $(partclone_exfat_OBJECTS) $(partclone_exfat_LDADD) $(LIBS) partclone.extfs$(EXEEXT): $(partclone_extfs_OBJECTS) $(partclone_extfs_DEPENDENCIES) @rm -f partclone.extfs$(EXEEXT) $(partclone_extfs_LINK) $(partclone_extfs_OBJECTS) $(partclone_extfs_LDADD) $(LIBS) partclone.fat$(EXEEXT): $(partclone_fat_OBJECTS) $(partclone_fat_DEPENDENCIES) @rm -f partclone.fat$(EXEEXT) $(partclone_fat_LINK) $(partclone_fat_OBJECTS) $(partclone_fat_LDADD) $(LIBS) partclone.fstype$(EXEEXT): $(partclone_fstype_OBJECTS) $(partclone_fstype_DEPENDENCIES) @rm -f partclone.fstype$(EXEEXT) $(partclone_fstype_LINK) $(partclone_fstype_OBJECTS) $(partclone_fstype_LDADD) $(LIBS) partclone.hfsp$(EXEEXT): $(partclone_hfsp_OBJECTS) $(partclone_hfsp_DEPENDENCIES) @rm -f partclone.hfsp$(EXEEXT) $(partclone_hfsp_LINK) $(partclone_hfsp_OBJECTS) $(partclone_hfsp_LDADD) $(LIBS) partclone.info$(EXEEXT): $(partclone_info_OBJECTS) $(partclone_info_DEPENDENCIES) @rm -f partclone.info$(EXEEXT) $(LINK) $(partclone_info_OBJECTS) $(partclone_info_LDADD) $(LIBS) partclone.jfs$(EXEEXT): $(partclone_jfs_OBJECTS) $(partclone_jfs_DEPENDENCIES) @rm -f partclone.jfs$(EXEEXT) $(partclone_jfs_LINK) $(partclone_jfs_OBJECTS) $(partclone_jfs_LDADD) $(LIBS) partclone.ntfs$(EXEEXT): $(partclone_ntfs_OBJECTS) $(partclone_ntfs_DEPENDENCIES) @rm -f partclone.ntfs$(EXEEXT) $(partclone_ntfs_LINK) $(partclone_ntfs_OBJECTS) $(partclone_ntfs_LDADD) $(LIBS) partclone.ntfsfixboot$(EXEEXT): $(partclone_ntfsfixboot_OBJECTS) $(partclone_ntfsfixboot_DEPENDENCIES) @rm -f partclone.ntfsfixboot$(EXEEXT) $(LINK) $(partclone_ntfsfixboot_OBJECTS) $(partclone_ntfsfixboot_LDADD) $(LIBS) partclone.reiser4$(EXEEXT): $(partclone_reiser4_OBJECTS) $(partclone_reiser4_DEPENDENCIES) @rm -f partclone.reiser4$(EXEEXT) $(partclone_reiser4_LINK) $(partclone_reiser4_OBJECTS) $(partclone_reiser4_LDADD) $(LIBS) partclone.reiserfs$(EXEEXT): $(partclone_reiserfs_OBJECTS) $(partclone_reiserfs_DEPENDENCIES) @rm -f partclone.reiserfs$(EXEEXT) $(partclone_reiserfs_LINK) $(partclone_reiserfs_OBJECTS) $(partclone_reiserfs_LDADD) $(LIBS) partclone.restore$(EXEEXT): $(partclone_restore_OBJECTS) $(partclone_restore_DEPENDENCIES) @rm -f partclone.restore$(EXEEXT) $(partclone_restore_LINK) $(partclone_restore_OBJECTS) $(partclone_restore_LDADD) $(LIBS) partclone.ufs$(EXEEXT): $(partclone_ufs_OBJECTS) $(partclone_ufs_DEPENDENCIES) @rm -f partclone.ufs$(EXEEXT) $(partclone_ufs_LINK) $(partclone_ufs_OBJECTS) $(partclone_ufs_LDADD) $(LIBS) partclone.vmfs$(EXEEXT): $(partclone_vmfs_OBJECTS) $(partclone_vmfs_DEPENDENCIES) @rm -f partclone.vmfs$(EXEEXT) $(partclone_vmfs_LINK) $(partclone_vmfs_OBJECTS) $(partclone_vmfs_LDADD) $(LIBS) partclone.vmfs5$(EXEEXT): $(partclone_vmfs5_OBJECTS) $(partclone_vmfs5_DEPENDENCIES) @rm -f partclone.vmfs5$(EXEEXT) $(partclone_vmfs5_LINK) $(partclone_vmfs5_OBJECTS) $(partclone_vmfs5_LDADD) $(LIBS) partclone.xfs$(EXEEXT): $(partclone_xfs_OBJECTS) $(partclone_xfs_DEPENDENCIES) @rm -f partclone.xfs$(EXEEXT) $(partclone_xfs_LINK) $(partclone_xfs_OBJECTS) $(partclone_xfs_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkimg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/infoclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntfsfixboot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-btrfsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-crc32c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-ctree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-dir-item.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-disk-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-extent-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-extent-tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-extent_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-file-item.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-inode-item.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-inode-map.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-print-tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-radix-tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-rbtree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-root-tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_btrfs-volumes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-cluster.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-exfatclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-lookup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-mount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-node.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-utf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_exfat-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_extfs-extfsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_extfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_extfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_extfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_fat-fatclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_fat-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_fat-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_fat-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_fstype-fstype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_hfsp-hfsplusclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_hfsp-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_hfsp-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_hfsp-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_jfs-jfsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_jfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_jfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_jfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ntfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ntfs-ntfsclone-ng.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ntfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ntfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiser4-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiser4-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiser4-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiser4-reiser4clone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiserfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiserfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiserfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_reiserfs-reiserfsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_restore-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_restore-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_restore-restore.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ufs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ufs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ufs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_ufs-ufsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs-vmfsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs5-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs5-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs5-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_vmfs5-vmfs5clone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_xfs-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_xfs-partclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_xfs-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partclone_xfs-xfsclone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progress.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` partclone_btrfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-main.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-main.Tpo -c -o partclone_btrfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-main.Tpo $(DEPDIR)/partclone_btrfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_btrfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_btrfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-main.Tpo -c -o partclone_btrfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-main.Tpo $(DEPDIR)/partclone_btrfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_btrfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_btrfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-partclone.Tpo -c -o partclone_btrfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-partclone.Tpo $(DEPDIR)/partclone_btrfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_btrfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_btrfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-partclone.Tpo -c -o partclone_btrfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-partclone.Tpo $(DEPDIR)/partclone_btrfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_btrfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_btrfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-progress.Tpo -c -o partclone_btrfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-progress.Tpo $(DEPDIR)/partclone_btrfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_btrfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_btrfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-progress.Tpo -c -o partclone_btrfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-progress.Tpo $(DEPDIR)/partclone_btrfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_btrfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_btrfs-btrfsclone.o: btrfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-btrfsclone.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-btrfsclone.Tpo -c -o partclone_btrfs-btrfsclone.o `test -f 'btrfsclone.c' || echo '$(srcdir)/'`btrfsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-btrfsclone.Tpo $(DEPDIR)/partclone_btrfs-btrfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfsclone.c' object='partclone_btrfs-btrfsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-btrfsclone.o `test -f 'btrfsclone.c' || echo '$(srcdir)/'`btrfsclone.c partclone_btrfs-btrfsclone.obj: btrfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-btrfsclone.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-btrfsclone.Tpo -c -o partclone_btrfs-btrfsclone.obj `if test -f 'btrfsclone.c'; then $(CYGPATH_W) 'btrfsclone.c'; else $(CYGPATH_W) '$(srcdir)/btrfsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-btrfsclone.Tpo $(DEPDIR)/partclone_btrfs-btrfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfsclone.c' object='partclone_btrfs-btrfsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-btrfsclone.obj `if test -f 'btrfsclone.c'; then $(CYGPATH_W) 'btrfsclone.c'; else $(CYGPATH_W) '$(srcdir)/btrfsclone.c'; fi` partclone_btrfs-crc32c.o: btrfs/crc32c.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-crc32c.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-crc32c.Tpo -c -o partclone_btrfs-crc32c.o `test -f 'btrfs/crc32c.c' || echo '$(srcdir)/'`btrfs/crc32c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-crc32c.Tpo $(DEPDIR)/partclone_btrfs-crc32c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/crc32c.c' object='partclone_btrfs-crc32c.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-crc32c.o `test -f 'btrfs/crc32c.c' || echo '$(srcdir)/'`btrfs/crc32c.c partclone_btrfs-crc32c.obj: btrfs/crc32c.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-crc32c.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-crc32c.Tpo -c -o partclone_btrfs-crc32c.obj `if test -f 'btrfs/crc32c.c'; then $(CYGPATH_W) 'btrfs/crc32c.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/crc32c.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-crc32c.Tpo $(DEPDIR)/partclone_btrfs-crc32c.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/crc32c.c' object='partclone_btrfs-crc32c.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-crc32c.obj `if test -f 'btrfs/crc32c.c'; then $(CYGPATH_W) 'btrfs/crc32c.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/crc32c.c'; fi` partclone_btrfs-disk-io.o: btrfs/disk-io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-disk-io.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-disk-io.Tpo -c -o partclone_btrfs-disk-io.o `test -f 'btrfs/disk-io.c' || echo '$(srcdir)/'`btrfs/disk-io.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-disk-io.Tpo $(DEPDIR)/partclone_btrfs-disk-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/disk-io.c' object='partclone_btrfs-disk-io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-disk-io.o `test -f 'btrfs/disk-io.c' || echo '$(srcdir)/'`btrfs/disk-io.c partclone_btrfs-disk-io.obj: btrfs/disk-io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-disk-io.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-disk-io.Tpo -c -o partclone_btrfs-disk-io.obj `if test -f 'btrfs/disk-io.c'; then $(CYGPATH_W) 'btrfs/disk-io.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/disk-io.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-disk-io.Tpo $(DEPDIR)/partclone_btrfs-disk-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/disk-io.c' object='partclone_btrfs-disk-io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-disk-io.obj `if test -f 'btrfs/disk-io.c'; then $(CYGPATH_W) 'btrfs/disk-io.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/disk-io.c'; fi` partclone_btrfs-extent-tree.o: btrfs/extent-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-extent-tree.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-extent-tree.Tpo -c -o partclone_btrfs-extent-tree.o `test -f 'btrfs/extent-tree.c' || echo '$(srcdir)/'`btrfs/extent-tree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-extent-tree.Tpo $(DEPDIR)/partclone_btrfs-extent-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/extent-tree.c' object='partclone_btrfs-extent-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-extent-tree.o `test -f 'btrfs/extent-tree.c' || echo '$(srcdir)/'`btrfs/extent-tree.c partclone_btrfs-extent-tree.obj: btrfs/extent-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-extent-tree.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-extent-tree.Tpo -c -o partclone_btrfs-extent-tree.obj `if test -f 'btrfs/extent-tree.c'; then $(CYGPATH_W) 'btrfs/extent-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/extent-tree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-extent-tree.Tpo $(DEPDIR)/partclone_btrfs-extent-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/extent-tree.c' object='partclone_btrfs-extent-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-extent-tree.obj `if test -f 'btrfs/extent-tree.c'; then $(CYGPATH_W) 'btrfs/extent-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/extent-tree.c'; fi` partclone_btrfs-inode-map.o: btrfs/inode-map.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-inode-map.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-inode-map.Tpo -c -o partclone_btrfs-inode-map.o `test -f 'btrfs/inode-map.c' || echo '$(srcdir)/'`btrfs/inode-map.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-inode-map.Tpo $(DEPDIR)/partclone_btrfs-inode-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/inode-map.c' object='partclone_btrfs-inode-map.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-inode-map.o `test -f 'btrfs/inode-map.c' || echo '$(srcdir)/'`btrfs/inode-map.c partclone_btrfs-inode-map.obj: btrfs/inode-map.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-inode-map.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-inode-map.Tpo -c -o partclone_btrfs-inode-map.obj `if test -f 'btrfs/inode-map.c'; then $(CYGPATH_W) 'btrfs/inode-map.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/inode-map.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-inode-map.Tpo $(DEPDIR)/partclone_btrfs-inode-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/inode-map.c' object='partclone_btrfs-inode-map.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-inode-map.obj `if test -f 'btrfs/inode-map.c'; then $(CYGPATH_W) 'btrfs/inode-map.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/inode-map.c'; fi` partclone_btrfs-rbtree.o: btrfs/rbtree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-rbtree.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-rbtree.Tpo -c -o partclone_btrfs-rbtree.o `test -f 'btrfs/rbtree.c' || echo '$(srcdir)/'`btrfs/rbtree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-rbtree.Tpo $(DEPDIR)/partclone_btrfs-rbtree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/rbtree.c' object='partclone_btrfs-rbtree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-rbtree.o `test -f 'btrfs/rbtree.c' || echo '$(srcdir)/'`btrfs/rbtree.c partclone_btrfs-rbtree.obj: btrfs/rbtree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-rbtree.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-rbtree.Tpo -c -o partclone_btrfs-rbtree.obj `if test -f 'btrfs/rbtree.c'; then $(CYGPATH_W) 'btrfs/rbtree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/rbtree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-rbtree.Tpo $(DEPDIR)/partclone_btrfs-rbtree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/rbtree.c' object='partclone_btrfs-rbtree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-rbtree.obj `if test -f 'btrfs/rbtree.c'; then $(CYGPATH_W) 'btrfs/rbtree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/rbtree.c'; fi` partclone_btrfs-volumes.o: btrfs/volumes.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-volumes.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-volumes.Tpo -c -o partclone_btrfs-volumes.o `test -f 'btrfs/volumes.c' || echo '$(srcdir)/'`btrfs/volumes.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-volumes.Tpo $(DEPDIR)/partclone_btrfs-volumes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/volumes.c' object='partclone_btrfs-volumes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-volumes.o `test -f 'btrfs/volumes.c' || echo '$(srcdir)/'`btrfs/volumes.c partclone_btrfs-volumes.obj: btrfs/volumes.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-volumes.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-volumes.Tpo -c -o partclone_btrfs-volumes.obj `if test -f 'btrfs/volumes.c'; then $(CYGPATH_W) 'btrfs/volumes.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/volumes.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-volumes.Tpo $(DEPDIR)/partclone_btrfs-volumes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/volumes.c' object='partclone_btrfs-volumes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-volumes.obj `if test -f 'btrfs/volumes.c'; then $(CYGPATH_W) 'btrfs/volumes.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/volumes.c'; fi` partclone_btrfs-ctree.o: btrfs/ctree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-ctree.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-ctree.Tpo -c -o partclone_btrfs-ctree.o `test -f 'btrfs/ctree.c' || echo '$(srcdir)/'`btrfs/ctree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-ctree.Tpo $(DEPDIR)/partclone_btrfs-ctree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/ctree.c' object='partclone_btrfs-ctree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-ctree.o `test -f 'btrfs/ctree.c' || echo '$(srcdir)/'`btrfs/ctree.c partclone_btrfs-ctree.obj: btrfs/ctree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-ctree.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-ctree.Tpo -c -o partclone_btrfs-ctree.obj `if test -f 'btrfs/ctree.c'; then $(CYGPATH_W) 'btrfs/ctree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/ctree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-ctree.Tpo $(DEPDIR)/partclone_btrfs-ctree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/ctree.c' object='partclone_btrfs-ctree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-ctree.obj `if test -f 'btrfs/ctree.c'; then $(CYGPATH_W) 'btrfs/ctree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/ctree.c'; fi` partclone_btrfs-extent-cache.o: btrfs/extent-cache.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-extent-cache.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-extent-cache.Tpo -c -o partclone_btrfs-extent-cache.o `test -f 'btrfs/extent-cache.c' || echo '$(srcdir)/'`btrfs/extent-cache.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-extent-cache.Tpo $(DEPDIR)/partclone_btrfs-extent-cache.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/extent-cache.c' object='partclone_btrfs-extent-cache.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-extent-cache.o `test -f 'btrfs/extent-cache.c' || echo '$(srcdir)/'`btrfs/extent-cache.c partclone_btrfs-extent-cache.obj: btrfs/extent-cache.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-extent-cache.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-extent-cache.Tpo -c -o partclone_btrfs-extent-cache.obj `if test -f 'btrfs/extent-cache.c'; then $(CYGPATH_W) 'btrfs/extent-cache.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/extent-cache.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-extent-cache.Tpo $(DEPDIR)/partclone_btrfs-extent-cache.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/extent-cache.c' object='partclone_btrfs-extent-cache.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-extent-cache.obj `if test -f 'btrfs/extent-cache.c'; then $(CYGPATH_W) 'btrfs/extent-cache.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/extent-cache.c'; fi` partclone_btrfs-file-item.o: btrfs/file-item.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-file-item.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-file-item.Tpo -c -o partclone_btrfs-file-item.o `test -f 'btrfs/file-item.c' || echo '$(srcdir)/'`btrfs/file-item.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-file-item.Tpo $(DEPDIR)/partclone_btrfs-file-item.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/file-item.c' object='partclone_btrfs-file-item.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-file-item.o `test -f 'btrfs/file-item.c' || echo '$(srcdir)/'`btrfs/file-item.c partclone_btrfs-file-item.obj: btrfs/file-item.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-file-item.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-file-item.Tpo -c -o partclone_btrfs-file-item.obj `if test -f 'btrfs/file-item.c'; then $(CYGPATH_W) 'btrfs/file-item.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/file-item.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-file-item.Tpo $(DEPDIR)/partclone_btrfs-file-item.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/file-item.c' object='partclone_btrfs-file-item.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-file-item.obj `if test -f 'btrfs/file-item.c'; then $(CYGPATH_W) 'btrfs/file-item.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/file-item.c'; fi` partclone_btrfs-print-tree.o: btrfs/print-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-print-tree.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-print-tree.Tpo -c -o partclone_btrfs-print-tree.o `test -f 'btrfs/print-tree.c' || echo '$(srcdir)/'`btrfs/print-tree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-print-tree.Tpo $(DEPDIR)/partclone_btrfs-print-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/print-tree.c' object='partclone_btrfs-print-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-print-tree.o `test -f 'btrfs/print-tree.c' || echo '$(srcdir)/'`btrfs/print-tree.c partclone_btrfs-print-tree.obj: btrfs/print-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-print-tree.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-print-tree.Tpo -c -o partclone_btrfs-print-tree.obj `if test -f 'btrfs/print-tree.c'; then $(CYGPATH_W) 'btrfs/print-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/print-tree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-print-tree.Tpo $(DEPDIR)/partclone_btrfs-print-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/print-tree.c' object='partclone_btrfs-print-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-print-tree.obj `if test -f 'btrfs/print-tree.c'; then $(CYGPATH_W) 'btrfs/print-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/print-tree.c'; fi` partclone_btrfs-root-tree.o: btrfs/root-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-root-tree.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-root-tree.Tpo -c -o partclone_btrfs-root-tree.o `test -f 'btrfs/root-tree.c' || echo '$(srcdir)/'`btrfs/root-tree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-root-tree.Tpo $(DEPDIR)/partclone_btrfs-root-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/root-tree.c' object='partclone_btrfs-root-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-root-tree.o `test -f 'btrfs/root-tree.c' || echo '$(srcdir)/'`btrfs/root-tree.c partclone_btrfs-root-tree.obj: btrfs/root-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-root-tree.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-root-tree.Tpo -c -o partclone_btrfs-root-tree.obj `if test -f 'btrfs/root-tree.c'; then $(CYGPATH_W) 'btrfs/root-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/root-tree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-root-tree.Tpo $(DEPDIR)/partclone_btrfs-root-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/root-tree.c' object='partclone_btrfs-root-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-root-tree.obj `if test -f 'btrfs/root-tree.c'; then $(CYGPATH_W) 'btrfs/root-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/root-tree.c'; fi` partclone_btrfs-dir-item.o: btrfs/dir-item.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-dir-item.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-dir-item.Tpo -c -o partclone_btrfs-dir-item.o `test -f 'btrfs/dir-item.c' || echo '$(srcdir)/'`btrfs/dir-item.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-dir-item.Tpo $(DEPDIR)/partclone_btrfs-dir-item.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/dir-item.c' object='partclone_btrfs-dir-item.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-dir-item.o `test -f 'btrfs/dir-item.c' || echo '$(srcdir)/'`btrfs/dir-item.c partclone_btrfs-dir-item.obj: btrfs/dir-item.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-dir-item.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-dir-item.Tpo -c -o partclone_btrfs-dir-item.obj `if test -f 'btrfs/dir-item.c'; then $(CYGPATH_W) 'btrfs/dir-item.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/dir-item.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-dir-item.Tpo $(DEPDIR)/partclone_btrfs-dir-item.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/dir-item.c' object='partclone_btrfs-dir-item.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-dir-item.obj `if test -f 'btrfs/dir-item.c'; then $(CYGPATH_W) 'btrfs/dir-item.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/dir-item.c'; fi` partclone_btrfs-extent_io.o: btrfs/extent_io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-extent_io.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-extent_io.Tpo -c -o partclone_btrfs-extent_io.o `test -f 'btrfs/extent_io.c' || echo '$(srcdir)/'`btrfs/extent_io.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-extent_io.Tpo $(DEPDIR)/partclone_btrfs-extent_io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/extent_io.c' object='partclone_btrfs-extent_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-extent_io.o `test -f 'btrfs/extent_io.c' || echo '$(srcdir)/'`btrfs/extent_io.c partclone_btrfs-extent_io.obj: btrfs/extent_io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-extent_io.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-extent_io.Tpo -c -o partclone_btrfs-extent_io.obj `if test -f 'btrfs/extent_io.c'; then $(CYGPATH_W) 'btrfs/extent_io.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/extent_io.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-extent_io.Tpo $(DEPDIR)/partclone_btrfs-extent_io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/extent_io.c' object='partclone_btrfs-extent_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-extent_io.obj `if test -f 'btrfs/extent_io.c'; then $(CYGPATH_W) 'btrfs/extent_io.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/extent_io.c'; fi` partclone_btrfs-inode-item.o: btrfs/inode-item.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-inode-item.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-inode-item.Tpo -c -o partclone_btrfs-inode-item.o `test -f 'btrfs/inode-item.c' || echo '$(srcdir)/'`btrfs/inode-item.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-inode-item.Tpo $(DEPDIR)/partclone_btrfs-inode-item.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/inode-item.c' object='partclone_btrfs-inode-item.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-inode-item.o `test -f 'btrfs/inode-item.c' || echo '$(srcdir)/'`btrfs/inode-item.c partclone_btrfs-inode-item.obj: btrfs/inode-item.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-inode-item.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-inode-item.Tpo -c -o partclone_btrfs-inode-item.obj `if test -f 'btrfs/inode-item.c'; then $(CYGPATH_W) 'btrfs/inode-item.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/inode-item.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-inode-item.Tpo $(DEPDIR)/partclone_btrfs-inode-item.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/inode-item.c' object='partclone_btrfs-inode-item.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-inode-item.obj `if test -f 'btrfs/inode-item.c'; then $(CYGPATH_W) 'btrfs/inode-item.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/inode-item.c'; fi` partclone_btrfs-radix-tree.o: btrfs/radix-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-radix-tree.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-radix-tree.Tpo -c -o partclone_btrfs-radix-tree.o `test -f 'btrfs/radix-tree.c' || echo '$(srcdir)/'`btrfs/radix-tree.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-radix-tree.Tpo $(DEPDIR)/partclone_btrfs-radix-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/radix-tree.c' object='partclone_btrfs-radix-tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-radix-tree.o `test -f 'btrfs/radix-tree.c' || echo '$(srcdir)/'`btrfs/radix-tree.c partclone_btrfs-radix-tree.obj: btrfs/radix-tree.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-radix-tree.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-radix-tree.Tpo -c -o partclone_btrfs-radix-tree.obj `if test -f 'btrfs/radix-tree.c'; then $(CYGPATH_W) 'btrfs/radix-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/radix-tree.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-radix-tree.Tpo $(DEPDIR)/partclone_btrfs-radix-tree.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/radix-tree.c' object='partclone_btrfs-radix-tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-radix-tree.obj `if test -f 'btrfs/radix-tree.c'; then $(CYGPATH_W) 'btrfs/radix-tree.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/radix-tree.c'; fi` partclone_btrfs-utils.o: btrfs/utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-utils.o -MD -MP -MF $(DEPDIR)/partclone_btrfs-utils.Tpo -c -o partclone_btrfs-utils.o `test -f 'btrfs/utils.c' || echo '$(srcdir)/'`btrfs/utils.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-utils.Tpo $(DEPDIR)/partclone_btrfs-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/utils.c' object='partclone_btrfs-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-utils.o `test -f 'btrfs/utils.c' || echo '$(srcdir)/'`btrfs/utils.c partclone_btrfs-utils.obj: btrfs/utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -MT partclone_btrfs-utils.obj -MD -MP -MF $(DEPDIR)/partclone_btrfs-utils.Tpo -c -o partclone_btrfs-utils.obj `if test -f 'btrfs/utils.c'; then $(CYGPATH_W) 'btrfs/utils.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/utils.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_btrfs-utils.Tpo $(DEPDIR)/partclone_btrfs-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btrfs/utils.c' object='partclone_btrfs-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_btrfs_CFLAGS) $(CFLAGS) -c -o partclone_btrfs-utils.obj `if test -f 'btrfs/utils.c'; then $(CYGPATH_W) 'btrfs/utils.c'; else $(CYGPATH_W) '$(srcdir)/btrfs/utils.c'; fi` partclone_exfat-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-main.o -MD -MP -MF $(DEPDIR)/partclone_exfat-main.Tpo -c -o partclone_exfat-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-main.Tpo $(DEPDIR)/partclone_exfat-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_exfat-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_exfat-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-main.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-main.Tpo -c -o partclone_exfat-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-main.Tpo $(DEPDIR)/partclone_exfat-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_exfat-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_exfat-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-partclone.o -MD -MP -MF $(DEPDIR)/partclone_exfat-partclone.Tpo -c -o partclone_exfat-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-partclone.Tpo $(DEPDIR)/partclone_exfat-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_exfat-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_exfat-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-partclone.Tpo -c -o partclone_exfat-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-partclone.Tpo $(DEPDIR)/partclone_exfat-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_exfat-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_exfat-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-progress.o -MD -MP -MF $(DEPDIR)/partclone_exfat-progress.Tpo -c -o partclone_exfat-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-progress.Tpo $(DEPDIR)/partclone_exfat-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_exfat-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_exfat-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-progress.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-progress.Tpo -c -o partclone_exfat-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-progress.Tpo $(DEPDIR)/partclone_exfat-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_exfat-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_exfat-exfatclone.o: exfatclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-exfatclone.o -MD -MP -MF $(DEPDIR)/partclone_exfat-exfatclone.Tpo -c -o partclone_exfat-exfatclone.o `test -f 'exfatclone.c' || echo '$(srcdir)/'`exfatclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-exfatclone.Tpo $(DEPDIR)/partclone_exfat-exfatclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfatclone.c' object='partclone_exfat-exfatclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-exfatclone.o `test -f 'exfatclone.c' || echo '$(srcdir)/'`exfatclone.c partclone_exfat-exfatclone.obj: exfatclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-exfatclone.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-exfatclone.Tpo -c -o partclone_exfat-exfatclone.obj `if test -f 'exfatclone.c'; then $(CYGPATH_W) 'exfatclone.c'; else $(CYGPATH_W) '$(srcdir)/exfatclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-exfatclone.Tpo $(DEPDIR)/partclone_exfat-exfatclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfatclone.c' object='partclone_exfat-exfatclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-exfatclone.obj `if test -f 'exfatclone.c'; then $(CYGPATH_W) 'exfatclone.c'; else $(CYGPATH_W) '$(srcdir)/exfatclone.c'; fi` partclone_exfat-cluster.o: exfat/cluster.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-cluster.o -MD -MP -MF $(DEPDIR)/partclone_exfat-cluster.Tpo -c -o partclone_exfat-cluster.o `test -f 'exfat/cluster.c' || echo '$(srcdir)/'`exfat/cluster.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-cluster.Tpo $(DEPDIR)/partclone_exfat-cluster.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/cluster.c' object='partclone_exfat-cluster.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-cluster.o `test -f 'exfat/cluster.c' || echo '$(srcdir)/'`exfat/cluster.c partclone_exfat-cluster.obj: exfat/cluster.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-cluster.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-cluster.Tpo -c -o partclone_exfat-cluster.obj `if test -f 'exfat/cluster.c'; then $(CYGPATH_W) 'exfat/cluster.c'; else $(CYGPATH_W) '$(srcdir)/exfat/cluster.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-cluster.Tpo $(DEPDIR)/partclone_exfat-cluster.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/cluster.c' object='partclone_exfat-cluster.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-cluster.obj `if test -f 'exfat/cluster.c'; then $(CYGPATH_W) 'exfat/cluster.c'; else $(CYGPATH_W) '$(srcdir)/exfat/cluster.c'; fi` partclone_exfat-io.o: exfat/io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-io.o -MD -MP -MF $(DEPDIR)/partclone_exfat-io.Tpo -c -o partclone_exfat-io.o `test -f 'exfat/io.c' || echo '$(srcdir)/'`exfat/io.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-io.Tpo $(DEPDIR)/partclone_exfat-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/io.c' object='partclone_exfat-io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-io.o `test -f 'exfat/io.c' || echo '$(srcdir)/'`exfat/io.c partclone_exfat-io.obj: exfat/io.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-io.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-io.Tpo -c -o partclone_exfat-io.obj `if test -f 'exfat/io.c'; then $(CYGPATH_W) 'exfat/io.c'; else $(CYGPATH_W) '$(srcdir)/exfat/io.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-io.Tpo $(DEPDIR)/partclone_exfat-io.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/io.c' object='partclone_exfat-io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-io.obj `if test -f 'exfat/io.c'; then $(CYGPATH_W) 'exfat/io.c'; else $(CYGPATH_W) '$(srcdir)/exfat/io.c'; fi` partclone_exfat-log.o: exfat/log.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-log.o -MD -MP -MF $(DEPDIR)/partclone_exfat-log.Tpo -c -o partclone_exfat-log.o `test -f 'exfat/log.c' || echo '$(srcdir)/'`exfat/log.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-log.Tpo $(DEPDIR)/partclone_exfat-log.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/log.c' object='partclone_exfat-log.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-log.o `test -f 'exfat/log.c' || echo '$(srcdir)/'`exfat/log.c partclone_exfat-log.obj: exfat/log.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-log.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-log.Tpo -c -o partclone_exfat-log.obj `if test -f 'exfat/log.c'; then $(CYGPATH_W) 'exfat/log.c'; else $(CYGPATH_W) '$(srcdir)/exfat/log.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-log.Tpo $(DEPDIR)/partclone_exfat-log.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/log.c' object='partclone_exfat-log.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-log.obj `if test -f 'exfat/log.c'; then $(CYGPATH_W) 'exfat/log.c'; else $(CYGPATH_W) '$(srcdir)/exfat/log.c'; fi` partclone_exfat-lookup.o: exfat/lookup.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-lookup.o -MD -MP -MF $(DEPDIR)/partclone_exfat-lookup.Tpo -c -o partclone_exfat-lookup.o `test -f 'exfat/lookup.c' || echo '$(srcdir)/'`exfat/lookup.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-lookup.Tpo $(DEPDIR)/partclone_exfat-lookup.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/lookup.c' object='partclone_exfat-lookup.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-lookup.o `test -f 'exfat/lookup.c' || echo '$(srcdir)/'`exfat/lookup.c partclone_exfat-lookup.obj: exfat/lookup.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-lookup.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-lookup.Tpo -c -o partclone_exfat-lookup.obj `if test -f 'exfat/lookup.c'; then $(CYGPATH_W) 'exfat/lookup.c'; else $(CYGPATH_W) '$(srcdir)/exfat/lookup.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-lookup.Tpo $(DEPDIR)/partclone_exfat-lookup.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/lookup.c' object='partclone_exfat-lookup.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-lookup.obj `if test -f 'exfat/lookup.c'; then $(CYGPATH_W) 'exfat/lookup.c'; else $(CYGPATH_W) '$(srcdir)/exfat/lookup.c'; fi` partclone_exfat-mount.o: exfat/mount.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-mount.o -MD -MP -MF $(DEPDIR)/partclone_exfat-mount.Tpo -c -o partclone_exfat-mount.o `test -f 'exfat/mount.c' || echo '$(srcdir)/'`exfat/mount.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-mount.Tpo $(DEPDIR)/partclone_exfat-mount.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/mount.c' object='partclone_exfat-mount.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-mount.o `test -f 'exfat/mount.c' || echo '$(srcdir)/'`exfat/mount.c partclone_exfat-mount.obj: exfat/mount.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-mount.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-mount.Tpo -c -o partclone_exfat-mount.obj `if test -f 'exfat/mount.c'; then $(CYGPATH_W) 'exfat/mount.c'; else $(CYGPATH_W) '$(srcdir)/exfat/mount.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-mount.Tpo $(DEPDIR)/partclone_exfat-mount.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/mount.c' object='partclone_exfat-mount.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-mount.obj `if test -f 'exfat/mount.c'; then $(CYGPATH_W) 'exfat/mount.c'; else $(CYGPATH_W) '$(srcdir)/exfat/mount.c'; fi` partclone_exfat-node.o: exfat/node.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-node.o -MD -MP -MF $(DEPDIR)/partclone_exfat-node.Tpo -c -o partclone_exfat-node.o `test -f 'exfat/node.c' || echo '$(srcdir)/'`exfat/node.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-node.Tpo $(DEPDIR)/partclone_exfat-node.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/node.c' object='partclone_exfat-node.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-node.o `test -f 'exfat/node.c' || echo '$(srcdir)/'`exfat/node.c partclone_exfat-node.obj: exfat/node.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-node.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-node.Tpo -c -o partclone_exfat-node.obj `if test -f 'exfat/node.c'; then $(CYGPATH_W) 'exfat/node.c'; else $(CYGPATH_W) '$(srcdir)/exfat/node.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-node.Tpo $(DEPDIR)/partclone_exfat-node.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/node.c' object='partclone_exfat-node.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-node.obj `if test -f 'exfat/node.c'; then $(CYGPATH_W) 'exfat/node.c'; else $(CYGPATH_W) '$(srcdir)/exfat/node.c'; fi` partclone_exfat-time.o: exfat/time.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-time.o -MD -MP -MF $(DEPDIR)/partclone_exfat-time.Tpo -c -o partclone_exfat-time.o `test -f 'exfat/time.c' || echo '$(srcdir)/'`exfat/time.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-time.Tpo $(DEPDIR)/partclone_exfat-time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/time.c' object='partclone_exfat-time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-time.o `test -f 'exfat/time.c' || echo '$(srcdir)/'`exfat/time.c partclone_exfat-time.obj: exfat/time.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-time.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-time.Tpo -c -o partclone_exfat-time.obj `if test -f 'exfat/time.c'; then $(CYGPATH_W) 'exfat/time.c'; else $(CYGPATH_W) '$(srcdir)/exfat/time.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-time.Tpo $(DEPDIR)/partclone_exfat-time.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/time.c' object='partclone_exfat-time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-time.obj `if test -f 'exfat/time.c'; then $(CYGPATH_W) 'exfat/time.c'; else $(CYGPATH_W) '$(srcdir)/exfat/time.c'; fi` partclone_exfat-utf.o: exfat/utf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-utf.o -MD -MP -MF $(DEPDIR)/partclone_exfat-utf.Tpo -c -o partclone_exfat-utf.o `test -f 'exfat/utf.c' || echo '$(srcdir)/'`exfat/utf.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-utf.Tpo $(DEPDIR)/partclone_exfat-utf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/utf.c' object='partclone_exfat-utf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-utf.o `test -f 'exfat/utf.c' || echo '$(srcdir)/'`exfat/utf.c partclone_exfat-utf.obj: exfat/utf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-utf.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-utf.Tpo -c -o partclone_exfat-utf.obj `if test -f 'exfat/utf.c'; then $(CYGPATH_W) 'exfat/utf.c'; else $(CYGPATH_W) '$(srcdir)/exfat/utf.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-utf.Tpo $(DEPDIR)/partclone_exfat-utf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/utf.c' object='partclone_exfat-utf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-utf.obj `if test -f 'exfat/utf.c'; then $(CYGPATH_W) 'exfat/utf.c'; else $(CYGPATH_W) '$(srcdir)/exfat/utf.c'; fi` partclone_exfat-utils.o: exfat/utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-utils.o -MD -MP -MF $(DEPDIR)/partclone_exfat-utils.Tpo -c -o partclone_exfat-utils.o `test -f 'exfat/utils.c' || echo '$(srcdir)/'`exfat/utils.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-utils.Tpo $(DEPDIR)/partclone_exfat-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/utils.c' object='partclone_exfat-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-utils.o `test -f 'exfat/utils.c' || echo '$(srcdir)/'`exfat/utils.c partclone_exfat-utils.obj: exfat/utils.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -MT partclone_exfat-utils.obj -MD -MP -MF $(DEPDIR)/partclone_exfat-utils.Tpo -c -o partclone_exfat-utils.obj `if test -f 'exfat/utils.c'; then $(CYGPATH_W) 'exfat/utils.c'; else $(CYGPATH_W) '$(srcdir)/exfat/utils.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_exfat-utils.Tpo $(DEPDIR)/partclone_exfat-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exfat/utils.c' object='partclone_exfat-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_exfat_CFLAGS) $(CFLAGS) -c -o partclone_exfat-utils.obj `if test -f 'exfat/utils.c'; then $(CYGPATH_W) 'exfat/utils.c'; else $(CYGPATH_W) '$(srcdir)/exfat/utils.c'; fi` partclone_extfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-main.o -MD -MP -MF $(DEPDIR)/partclone_extfs-main.Tpo -c -o partclone_extfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-main.Tpo $(DEPDIR)/partclone_extfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_extfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_extfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_extfs-main.Tpo -c -o partclone_extfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-main.Tpo $(DEPDIR)/partclone_extfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_extfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_extfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_extfs-partclone.Tpo -c -o partclone_extfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-partclone.Tpo $(DEPDIR)/partclone_extfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_extfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_extfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_extfs-partclone.Tpo -c -o partclone_extfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-partclone.Tpo $(DEPDIR)/partclone_extfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_extfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_extfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_extfs-progress.Tpo -c -o partclone_extfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-progress.Tpo $(DEPDIR)/partclone_extfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_extfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_extfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_extfs-progress.Tpo -c -o partclone_extfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-progress.Tpo $(DEPDIR)/partclone_extfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_extfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_extfs-extfsclone.o: extfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-extfsclone.o -MD -MP -MF $(DEPDIR)/partclone_extfs-extfsclone.Tpo -c -o partclone_extfs-extfsclone.o `test -f 'extfsclone.c' || echo '$(srcdir)/'`extfsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-extfsclone.Tpo $(DEPDIR)/partclone_extfs-extfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extfsclone.c' object='partclone_extfs-extfsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-extfsclone.o `test -f 'extfsclone.c' || echo '$(srcdir)/'`extfsclone.c partclone_extfs-extfsclone.obj: extfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -MT partclone_extfs-extfsclone.obj -MD -MP -MF $(DEPDIR)/partclone_extfs-extfsclone.Tpo -c -o partclone_extfs-extfsclone.obj `if test -f 'extfsclone.c'; then $(CYGPATH_W) 'extfsclone.c'; else $(CYGPATH_W) '$(srcdir)/extfsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_extfs-extfsclone.Tpo $(DEPDIR)/partclone_extfs-extfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extfsclone.c' object='partclone_extfs-extfsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_extfs_CFLAGS) $(CFLAGS) -c -o partclone_extfs-extfsclone.obj `if test -f 'extfsclone.c'; then $(CYGPATH_W) 'extfsclone.c'; else $(CYGPATH_W) '$(srcdir)/extfsclone.c'; fi` partclone_fat-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-main.o -MD -MP -MF $(DEPDIR)/partclone_fat-main.Tpo -c -o partclone_fat-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-main.Tpo $(DEPDIR)/partclone_fat-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_fat-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_fat-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-main.obj -MD -MP -MF $(DEPDIR)/partclone_fat-main.Tpo -c -o partclone_fat-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-main.Tpo $(DEPDIR)/partclone_fat-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_fat-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_fat-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-partclone.o -MD -MP -MF $(DEPDIR)/partclone_fat-partclone.Tpo -c -o partclone_fat-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-partclone.Tpo $(DEPDIR)/partclone_fat-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_fat-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_fat-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_fat-partclone.Tpo -c -o partclone_fat-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-partclone.Tpo $(DEPDIR)/partclone_fat-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_fat-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_fat-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-progress.o -MD -MP -MF $(DEPDIR)/partclone_fat-progress.Tpo -c -o partclone_fat-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-progress.Tpo $(DEPDIR)/partclone_fat-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_fat-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_fat-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-progress.obj -MD -MP -MF $(DEPDIR)/partclone_fat-progress.Tpo -c -o partclone_fat-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-progress.Tpo $(DEPDIR)/partclone_fat-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_fat-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_fat-fatclone.o: fatclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-fatclone.o -MD -MP -MF $(DEPDIR)/partclone_fat-fatclone.Tpo -c -o partclone_fat-fatclone.o `test -f 'fatclone.c' || echo '$(srcdir)/'`fatclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-fatclone.Tpo $(DEPDIR)/partclone_fat-fatclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fatclone.c' object='partclone_fat-fatclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-fatclone.o `test -f 'fatclone.c' || echo '$(srcdir)/'`fatclone.c partclone_fat-fatclone.obj: fatclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -MT partclone_fat-fatclone.obj -MD -MP -MF $(DEPDIR)/partclone_fat-fatclone.Tpo -c -o partclone_fat-fatclone.obj `if test -f 'fatclone.c'; then $(CYGPATH_W) 'fatclone.c'; else $(CYGPATH_W) '$(srcdir)/fatclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fat-fatclone.Tpo $(DEPDIR)/partclone_fat-fatclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fatclone.c' object='partclone_fat-fatclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fat_CFLAGS) $(CFLAGS) -c -o partclone_fat-fatclone.obj `if test -f 'fatclone.c'; then $(CYGPATH_W) 'fatclone.c'; else $(CYGPATH_W) '$(srcdir)/fatclone.c'; fi` partclone_fstype-fstype.o: fstype.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fstype_CFLAGS) $(CFLAGS) -MT partclone_fstype-fstype.o -MD -MP -MF $(DEPDIR)/partclone_fstype-fstype.Tpo -c -o partclone_fstype-fstype.o `test -f 'fstype.c' || echo '$(srcdir)/'`fstype.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fstype-fstype.Tpo $(DEPDIR)/partclone_fstype-fstype.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstype.c' object='partclone_fstype-fstype.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fstype_CFLAGS) $(CFLAGS) -c -o partclone_fstype-fstype.o `test -f 'fstype.c' || echo '$(srcdir)/'`fstype.c partclone_fstype-fstype.obj: fstype.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fstype_CFLAGS) $(CFLAGS) -MT partclone_fstype-fstype.obj -MD -MP -MF $(DEPDIR)/partclone_fstype-fstype.Tpo -c -o partclone_fstype-fstype.obj `if test -f 'fstype.c'; then $(CYGPATH_W) 'fstype.c'; else $(CYGPATH_W) '$(srcdir)/fstype.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_fstype-fstype.Tpo $(DEPDIR)/partclone_fstype-fstype.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstype.c' object='partclone_fstype-fstype.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_fstype_CFLAGS) $(CFLAGS) -c -o partclone_fstype-fstype.obj `if test -f 'fstype.c'; then $(CYGPATH_W) 'fstype.c'; else $(CYGPATH_W) '$(srcdir)/fstype.c'; fi` partclone_hfsp-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-main.o -MD -MP -MF $(DEPDIR)/partclone_hfsp-main.Tpo -c -o partclone_hfsp-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-main.Tpo $(DEPDIR)/partclone_hfsp-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_hfsp-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_hfsp-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-main.obj -MD -MP -MF $(DEPDIR)/partclone_hfsp-main.Tpo -c -o partclone_hfsp-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-main.Tpo $(DEPDIR)/partclone_hfsp-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_hfsp-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_hfsp-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-partclone.o -MD -MP -MF $(DEPDIR)/partclone_hfsp-partclone.Tpo -c -o partclone_hfsp-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-partclone.Tpo $(DEPDIR)/partclone_hfsp-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_hfsp-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_hfsp-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_hfsp-partclone.Tpo -c -o partclone_hfsp-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-partclone.Tpo $(DEPDIR)/partclone_hfsp-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_hfsp-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_hfsp-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-progress.o -MD -MP -MF $(DEPDIR)/partclone_hfsp-progress.Tpo -c -o partclone_hfsp-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-progress.Tpo $(DEPDIR)/partclone_hfsp-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_hfsp-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_hfsp-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-progress.obj -MD -MP -MF $(DEPDIR)/partclone_hfsp-progress.Tpo -c -o partclone_hfsp-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-progress.Tpo $(DEPDIR)/partclone_hfsp-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_hfsp-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_hfsp-hfsplusclone.o: hfsplusclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-hfsplusclone.o -MD -MP -MF $(DEPDIR)/partclone_hfsp-hfsplusclone.Tpo -c -o partclone_hfsp-hfsplusclone.o `test -f 'hfsplusclone.c' || echo '$(srcdir)/'`hfsplusclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-hfsplusclone.Tpo $(DEPDIR)/partclone_hfsp-hfsplusclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hfsplusclone.c' object='partclone_hfsp-hfsplusclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-hfsplusclone.o `test -f 'hfsplusclone.c' || echo '$(srcdir)/'`hfsplusclone.c partclone_hfsp-hfsplusclone.obj: hfsplusclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -MT partclone_hfsp-hfsplusclone.obj -MD -MP -MF $(DEPDIR)/partclone_hfsp-hfsplusclone.Tpo -c -o partclone_hfsp-hfsplusclone.obj `if test -f 'hfsplusclone.c'; then $(CYGPATH_W) 'hfsplusclone.c'; else $(CYGPATH_W) '$(srcdir)/hfsplusclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_hfsp-hfsplusclone.Tpo $(DEPDIR)/partclone_hfsp-hfsplusclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hfsplusclone.c' object='partclone_hfsp-hfsplusclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_hfsp_CFLAGS) $(CFLAGS) -c -o partclone_hfsp-hfsplusclone.obj `if test -f 'hfsplusclone.c'; then $(CYGPATH_W) 'hfsplusclone.c'; else $(CYGPATH_W) '$(srcdir)/hfsplusclone.c'; fi` partclone_jfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-main.o -MD -MP -MF $(DEPDIR)/partclone_jfs-main.Tpo -c -o partclone_jfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-main.Tpo $(DEPDIR)/partclone_jfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_jfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_jfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_jfs-main.Tpo -c -o partclone_jfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-main.Tpo $(DEPDIR)/partclone_jfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_jfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_jfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_jfs-partclone.Tpo -c -o partclone_jfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-partclone.Tpo $(DEPDIR)/partclone_jfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_jfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_jfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_jfs-partclone.Tpo -c -o partclone_jfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-partclone.Tpo $(DEPDIR)/partclone_jfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_jfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_jfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_jfs-progress.Tpo -c -o partclone_jfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-progress.Tpo $(DEPDIR)/partclone_jfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_jfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_jfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_jfs-progress.Tpo -c -o partclone_jfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-progress.Tpo $(DEPDIR)/partclone_jfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_jfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_jfs-jfsclone.o: jfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-jfsclone.o -MD -MP -MF $(DEPDIR)/partclone_jfs-jfsclone.Tpo -c -o partclone_jfs-jfsclone.o `test -f 'jfsclone.c' || echo '$(srcdir)/'`jfsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-jfsclone.Tpo $(DEPDIR)/partclone_jfs-jfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jfsclone.c' object='partclone_jfs-jfsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-jfsclone.o `test -f 'jfsclone.c' || echo '$(srcdir)/'`jfsclone.c partclone_jfs-jfsclone.obj: jfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -MT partclone_jfs-jfsclone.obj -MD -MP -MF $(DEPDIR)/partclone_jfs-jfsclone.Tpo -c -o partclone_jfs-jfsclone.obj `if test -f 'jfsclone.c'; then $(CYGPATH_W) 'jfsclone.c'; else $(CYGPATH_W) '$(srcdir)/jfsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_jfs-jfsclone.Tpo $(DEPDIR)/partclone_jfs-jfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jfsclone.c' object='partclone_jfs-jfsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_jfs_CFLAGS) $(CFLAGS) -c -o partclone_jfs-jfsclone.obj `if test -f 'jfsclone.c'; then $(CYGPATH_W) 'jfsclone.c'; else $(CYGPATH_W) '$(srcdir)/jfsclone.c'; fi` partclone_ntfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-main.o -MD -MP -MF $(DEPDIR)/partclone_ntfs-main.Tpo -c -o partclone_ntfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-main.Tpo $(DEPDIR)/partclone_ntfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_ntfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_ntfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_ntfs-main.Tpo -c -o partclone_ntfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-main.Tpo $(DEPDIR)/partclone_ntfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_ntfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_ntfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_ntfs-partclone.Tpo -c -o partclone_ntfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-partclone.Tpo $(DEPDIR)/partclone_ntfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_ntfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_ntfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_ntfs-partclone.Tpo -c -o partclone_ntfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-partclone.Tpo $(DEPDIR)/partclone_ntfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_ntfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_ntfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_ntfs-progress.Tpo -c -o partclone_ntfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-progress.Tpo $(DEPDIR)/partclone_ntfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_ntfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_ntfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_ntfs-progress.Tpo -c -o partclone_ntfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-progress.Tpo $(DEPDIR)/partclone_ntfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_ntfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_ntfs-ntfsclone-ng.o: ntfsclone-ng.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-ntfsclone-ng.o -MD -MP -MF $(DEPDIR)/partclone_ntfs-ntfsclone-ng.Tpo -c -o partclone_ntfs-ntfsclone-ng.o `test -f 'ntfsclone-ng.c' || echo '$(srcdir)/'`ntfsclone-ng.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-ntfsclone-ng.Tpo $(DEPDIR)/partclone_ntfs-ntfsclone-ng.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntfsclone-ng.c' object='partclone_ntfs-ntfsclone-ng.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-ntfsclone-ng.o `test -f 'ntfsclone-ng.c' || echo '$(srcdir)/'`ntfsclone-ng.c partclone_ntfs-ntfsclone-ng.obj: ntfsclone-ng.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -MT partclone_ntfs-ntfsclone-ng.obj -MD -MP -MF $(DEPDIR)/partclone_ntfs-ntfsclone-ng.Tpo -c -o partclone_ntfs-ntfsclone-ng.obj `if test -f 'ntfsclone-ng.c'; then $(CYGPATH_W) 'ntfsclone-ng.c'; else $(CYGPATH_W) '$(srcdir)/ntfsclone-ng.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ntfs-ntfsclone-ng.Tpo $(DEPDIR)/partclone_ntfs-ntfsclone-ng.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntfsclone-ng.c' object='partclone_ntfs-ntfsclone-ng.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ntfs_CFLAGS) $(CFLAGS) -c -o partclone_ntfs-ntfsclone-ng.obj `if test -f 'ntfsclone-ng.c'; then $(CYGPATH_W) 'ntfsclone-ng.c'; else $(CYGPATH_W) '$(srcdir)/ntfsclone-ng.c'; fi` partclone_reiser4-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-main.o -MD -MP -MF $(DEPDIR)/partclone_reiser4-main.Tpo -c -o partclone_reiser4-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-main.Tpo $(DEPDIR)/partclone_reiser4-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_reiser4-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_reiser4-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-main.obj -MD -MP -MF $(DEPDIR)/partclone_reiser4-main.Tpo -c -o partclone_reiser4-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-main.Tpo $(DEPDIR)/partclone_reiser4-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_reiser4-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_reiser4-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-partclone.o -MD -MP -MF $(DEPDIR)/partclone_reiser4-partclone.Tpo -c -o partclone_reiser4-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-partclone.Tpo $(DEPDIR)/partclone_reiser4-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_reiser4-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_reiser4-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_reiser4-partclone.Tpo -c -o partclone_reiser4-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-partclone.Tpo $(DEPDIR)/partclone_reiser4-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_reiser4-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_reiser4-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-progress.o -MD -MP -MF $(DEPDIR)/partclone_reiser4-progress.Tpo -c -o partclone_reiser4-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-progress.Tpo $(DEPDIR)/partclone_reiser4-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_reiser4-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_reiser4-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-progress.obj -MD -MP -MF $(DEPDIR)/partclone_reiser4-progress.Tpo -c -o partclone_reiser4-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-progress.Tpo $(DEPDIR)/partclone_reiser4-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_reiser4-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_reiser4-reiser4clone.o: reiser4clone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-reiser4clone.o -MD -MP -MF $(DEPDIR)/partclone_reiser4-reiser4clone.Tpo -c -o partclone_reiser4-reiser4clone.o `test -f 'reiser4clone.c' || echo '$(srcdir)/'`reiser4clone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-reiser4clone.Tpo $(DEPDIR)/partclone_reiser4-reiser4clone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='reiser4clone.c' object='partclone_reiser4-reiser4clone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-reiser4clone.o `test -f 'reiser4clone.c' || echo '$(srcdir)/'`reiser4clone.c partclone_reiser4-reiser4clone.obj: reiser4clone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -MT partclone_reiser4-reiser4clone.obj -MD -MP -MF $(DEPDIR)/partclone_reiser4-reiser4clone.Tpo -c -o partclone_reiser4-reiser4clone.obj `if test -f 'reiser4clone.c'; then $(CYGPATH_W) 'reiser4clone.c'; else $(CYGPATH_W) '$(srcdir)/reiser4clone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiser4-reiser4clone.Tpo $(DEPDIR)/partclone_reiser4-reiser4clone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='reiser4clone.c' object='partclone_reiser4-reiser4clone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiser4_CFLAGS) $(CFLAGS) -c -o partclone_reiser4-reiser4clone.obj `if test -f 'reiser4clone.c'; then $(CYGPATH_W) 'reiser4clone.c'; else $(CYGPATH_W) '$(srcdir)/reiser4clone.c'; fi` partclone_reiserfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-main.o -MD -MP -MF $(DEPDIR)/partclone_reiserfs-main.Tpo -c -o partclone_reiserfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-main.Tpo $(DEPDIR)/partclone_reiserfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_reiserfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_reiserfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_reiserfs-main.Tpo -c -o partclone_reiserfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-main.Tpo $(DEPDIR)/partclone_reiserfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_reiserfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_reiserfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_reiserfs-partclone.Tpo -c -o partclone_reiserfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-partclone.Tpo $(DEPDIR)/partclone_reiserfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_reiserfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_reiserfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_reiserfs-partclone.Tpo -c -o partclone_reiserfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-partclone.Tpo $(DEPDIR)/partclone_reiserfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_reiserfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_reiserfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_reiserfs-progress.Tpo -c -o partclone_reiserfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-progress.Tpo $(DEPDIR)/partclone_reiserfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_reiserfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_reiserfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_reiserfs-progress.Tpo -c -o partclone_reiserfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-progress.Tpo $(DEPDIR)/partclone_reiserfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_reiserfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_reiserfs-reiserfsclone.o: reiserfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-reiserfsclone.o -MD -MP -MF $(DEPDIR)/partclone_reiserfs-reiserfsclone.Tpo -c -o partclone_reiserfs-reiserfsclone.o `test -f 'reiserfsclone.c' || echo '$(srcdir)/'`reiserfsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-reiserfsclone.Tpo $(DEPDIR)/partclone_reiserfs-reiserfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='reiserfsclone.c' object='partclone_reiserfs-reiserfsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-reiserfsclone.o `test -f 'reiserfsclone.c' || echo '$(srcdir)/'`reiserfsclone.c partclone_reiserfs-reiserfsclone.obj: reiserfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -MT partclone_reiserfs-reiserfsclone.obj -MD -MP -MF $(DEPDIR)/partclone_reiserfs-reiserfsclone.Tpo -c -o partclone_reiserfs-reiserfsclone.obj `if test -f 'reiserfsclone.c'; then $(CYGPATH_W) 'reiserfsclone.c'; else $(CYGPATH_W) '$(srcdir)/reiserfsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_reiserfs-reiserfsclone.Tpo $(DEPDIR)/partclone_reiserfs-reiserfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='reiserfsclone.c' object='partclone_reiserfs-reiserfsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_reiserfs_CFLAGS) $(CFLAGS) -c -o partclone_reiserfs-reiserfsclone.obj `if test -f 'reiserfsclone.c'; then $(CYGPATH_W) 'reiserfsclone.c'; else $(CYGPATH_W) '$(srcdir)/reiserfsclone.c'; fi` partclone_restore-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -MT partclone_restore-partclone.o -MD -MP -MF $(DEPDIR)/partclone_restore-partclone.Tpo -c -o partclone_restore-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_restore-partclone.Tpo $(DEPDIR)/partclone_restore-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_restore-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -c -o partclone_restore-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_restore-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -MT partclone_restore-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_restore-partclone.Tpo -c -o partclone_restore-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_restore-partclone.Tpo $(DEPDIR)/partclone_restore-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_restore-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -c -o partclone_restore-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_restore-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -MT partclone_restore-progress.o -MD -MP -MF $(DEPDIR)/partclone_restore-progress.Tpo -c -o partclone_restore-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_restore-progress.Tpo $(DEPDIR)/partclone_restore-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_restore-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -c -o partclone_restore-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_restore-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -MT partclone_restore-progress.obj -MD -MP -MF $(DEPDIR)/partclone_restore-progress.Tpo -c -o partclone_restore-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_restore-progress.Tpo $(DEPDIR)/partclone_restore-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_restore-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -c -o partclone_restore-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_restore-restore.o: restore.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -MT partclone_restore-restore.o -MD -MP -MF $(DEPDIR)/partclone_restore-restore.Tpo -c -o partclone_restore-restore.o `test -f 'restore.c' || echo '$(srcdir)/'`restore.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_restore-restore.Tpo $(DEPDIR)/partclone_restore-restore.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='restore.c' object='partclone_restore-restore.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -c -o partclone_restore-restore.o `test -f 'restore.c' || echo '$(srcdir)/'`restore.c partclone_restore-restore.obj: restore.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -MT partclone_restore-restore.obj -MD -MP -MF $(DEPDIR)/partclone_restore-restore.Tpo -c -o partclone_restore-restore.obj `if test -f 'restore.c'; then $(CYGPATH_W) 'restore.c'; else $(CYGPATH_W) '$(srcdir)/restore.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_restore-restore.Tpo $(DEPDIR)/partclone_restore-restore.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='restore.c' object='partclone_restore-restore.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_restore_CFLAGS) $(CFLAGS) -c -o partclone_restore-restore.obj `if test -f 'restore.c'; then $(CYGPATH_W) 'restore.c'; else $(CYGPATH_W) '$(srcdir)/restore.c'; fi` partclone_ufs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-main.o -MD -MP -MF $(DEPDIR)/partclone_ufs-main.Tpo -c -o partclone_ufs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-main.Tpo $(DEPDIR)/partclone_ufs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_ufs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_ufs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-main.obj -MD -MP -MF $(DEPDIR)/partclone_ufs-main.Tpo -c -o partclone_ufs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-main.Tpo $(DEPDIR)/partclone_ufs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_ufs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_ufs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_ufs-partclone.Tpo -c -o partclone_ufs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-partclone.Tpo $(DEPDIR)/partclone_ufs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_ufs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_ufs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_ufs-partclone.Tpo -c -o partclone_ufs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-partclone.Tpo $(DEPDIR)/partclone_ufs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_ufs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_ufs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-progress.o -MD -MP -MF $(DEPDIR)/partclone_ufs-progress.Tpo -c -o partclone_ufs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-progress.Tpo $(DEPDIR)/partclone_ufs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_ufs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_ufs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_ufs-progress.Tpo -c -o partclone_ufs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-progress.Tpo $(DEPDIR)/partclone_ufs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_ufs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_ufs-ufsclone.o: ufsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-ufsclone.o -MD -MP -MF $(DEPDIR)/partclone_ufs-ufsclone.Tpo -c -o partclone_ufs-ufsclone.o `test -f 'ufsclone.c' || echo '$(srcdir)/'`ufsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-ufsclone.Tpo $(DEPDIR)/partclone_ufs-ufsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ufsclone.c' object='partclone_ufs-ufsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-ufsclone.o `test -f 'ufsclone.c' || echo '$(srcdir)/'`ufsclone.c partclone_ufs-ufsclone.obj: ufsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -MT partclone_ufs-ufsclone.obj -MD -MP -MF $(DEPDIR)/partclone_ufs-ufsclone.Tpo -c -o partclone_ufs-ufsclone.obj `if test -f 'ufsclone.c'; then $(CYGPATH_W) 'ufsclone.c'; else $(CYGPATH_W) '$(srcdir)/ufsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_ufs-ufsclone.Tpo $(DEPDIR)/partclone_ufs-ufsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ufsclone.c' object='partclone_ufs-ufsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_ufs_CFLAGS) $(CFLAGS) -c -o partclone_ufs-ufsclone.obj `if test -f 'ufsclone.c'; then $(CYGPATH_W) 'ufsclone.c'; else $(CYGPATH_W) '$(srcdir)/ufsclone.c'; fi` partclone_vmfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-main.o -MD -MP -MF $(DEPDIR)/partclone_vmfs-main.Tpo -c -o partclone_vmfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-main.Tpo $(DEPDIR)/partclone_vmfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_vmfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_vmfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs-main.Tpo -c -o partclone_vmfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-main.Tpo $(DEPDIR)/partclone_vmfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_vmfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_vmfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_vmfs-partclone.Tpo -c -o partclone_vmfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-partclone.Tpo $(DEPDIR)/partclone_vmfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_vmfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_vmfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs-partclone.Tpo -c -o partclone_vmfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-partclone.Tpo $(DEPDIR)/partclone_vmfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_vmfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_vmfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_vmfs-progress.Tpo -c -o partclone_vmfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-progress.Tpo $(DEPDIR)/partclone_vmfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_vmfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_vmfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs-progress.Tpo -c -o partclone_vmfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-progress.Tpo $(DEPDIR)/partclone_vmfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_vmfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_vmfs-vmfsclone.o: vmfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-vmfsclone.o -MD -MP -MF $(DEPDIR)/partclone_vmfs-vmfsclone.Tpo -c -o partclone_vmfs-vmfsclone.o `test -f 'vmfsclone.c' || echo '$(srcdir)/'`vmfsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-vmfsclone.Tpo $(DEPDIR)/partclone_vmfs-vmfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmfsclone.c' object='partclone_vmfs-vmfsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-vmfsclone.o `test -f 'vmfsclone.c' || echo '$(srcdir)/'`vmfsclone.c partclone_vmfs-vmfsclone.obj: vmfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -MT partclone_vmfs-vmfsclone.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs-vmfsclone.Tpo -c -o partclone_vmfs-vmfsclone.obj `if test -f 'vmfsclone.c'; then $(CYGPATH_W) 'vmfsclone.c'; else $(CYGPATH_W) '$(srcdir)/vmfsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs-vmfsclone.Tpo $(DEPDIR)/partclone_vmfs-vmfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmfsclone.c' object='partclone_vmfs-vmfsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs_CFLAGS) $(CFLAGS) -c -o partclone_vmfs-vmfsclone.obj `if test -f 'vmfsclone.c'; then $(CYGPATH_W) 'vmfsclone.c'; else $(CYGPATH_W) '$(srcdir)/vmfsclone.c'; fi` partclone_vmfs5-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-main.o -MD -MP -MF $(DEPDIR)/partclone_vmfs5-main.Tpo -c -o partclone_vmfs5-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-main.Tpo $(DEPDIR)/partclone_vmfs5-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_vmfs5-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_vmfs5-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-main.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs5-main.Tpo -c -o partclone_vmfs5-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-main.Tpo $(DEPDIR)/partclone_vmfs5-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_vmfs5-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_vmfs5-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-partclone.o -MD -MP -MF $(DEPDIR)/partclone_vmfs5-partclone.Tpo -c -o partclone_vmfs5-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-partclone.Tpo $(DEPDIR)/partclone_vmfs5-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_vmfs5-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_vmfs5-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs5-partclone.Tpo -c -o partclone_vmfs5-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-partclone.Tpo $(DEPDIR)/partclone_vmfs5-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_vmfs5-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_vmfs5-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-progress.o -MD -MP -MF $(DEPDIR)/partclone_vmfs5-progress.Tpo -c -o partclone_vmfs5-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-progress.Tpo $(DEPDIR)/partclone_vmfs5-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_vmfs5-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_vmfs5-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-progress.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs5-progress.Tpo -c -o partclone_vmfs5-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-progress.Tpo $(DEPDIR)/partclone_vmfs5-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_vmfs5-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_vmfs5-vmfs5clone.o: vmfs5clone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-vmfs5clone.o -MD -MP -MF $(DEPDIR)/partclone_vmfs5-vmfs5clone.Tpo -c -o partclone_vmfs5-vmfs5clone.o `test -f 'vmfs5clone.c' || echo '$(srcdir)/'`vmfs5clone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-vmfs5clone.Tpo $(DEPDIR)/partclone_vmfs5-vmfs5clone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmfs5clone.c' object='partclone_vmfs5-vmfs5clone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-vmfs5clone.o `test -f 'vmfs5clone.c' || echo '$(srcdir)/'`vmfs5clone.c partclone_vmfs5-vmfs5clone.obj: vmfs5clone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -MT partclone_vmfs5-vmfs5clone.obj -MD -MP -MF $(DEPDIR)/partclone_vmfs5-vmfs5clone.Tpo -c -o partclone_vmfs5-vmfs5clone.obj `if test -f 'vmfs5clone.c'; then $(CYGPATH_W) 'vmfs5clone.c'; else $(CYGPATH_W) '$(srcdir)/vmfs5clone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_vmfs5-vmfs5clone.Tpo $(DEPDIR)/partclone_vmfs5-vmfs5clone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmfs5clone.c' object='partclone_vmfs5-vmfs5clone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_vmfs5_CFLAGS) $(CFLAGS) -c -o partclone_vmfs5-vmfs5clone.obj `if test -f 'vmfs5clone.c'; then $(CYGPATH_W) 'vmfs5clone.c'; else $(CYGPATH_W) '$(srcdir)/vmfs5clone.c'; fi` partclone_xfs-main.o: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-main.o -MD -MP -MF $(DEPDIR)/partclone_xfs-main.Tpo -c -o partclone_xfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-main.Tpo $(DEPDIR)/partclone_xfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_xfs-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c partclone_xfs-main.obj: main.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-main.obj -MD -MP -MF $(DEPDIR)/partclone_xfs-main.Tpo -c -o partclone_xfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-main.Tpo $(DEPDIR)/partclone_xfs-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='partclone_xfs-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` partclone_xfs-partclone.o: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-partclone.o -MD -MP -MF $(DEPDIR)/partclone_xfs-partclone.Tpo -c -o partclone_xfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-partclone.Tpo $(DEPDIR)/partclone_xfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_xfs-partclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-partclone.o `test -f 'partclone.c' || echo '$(srcdir)/'`partclone.c partclone_xfs-partclone.obj: partclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-partclone.obj -MD -MP -MF $(DEPDIR)/partclone_xfs-partclone.Tpo -c -o partclone_xfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-partclone.Tpo $(DEPDIR)/partclone_xfs-partclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='partclone.c' object='partclone_xfs-partclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-partclone.obj `if test -f 'partclone.c'; then $(CYGPATH_W) 'partclone.c'; else $(CYGPATH_W) '$(srcdir)/partclone.c'; fi` partclone_xfs-progress.o: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-progress.o -MD -MP -MF $(DEPDIR)/partclone_xfs-progress.Tpo -c -o partclone_xfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-progress.Tpo $(DEPDIR)/partclone_xfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_xfs-progress.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-progress.o `test -f 'progress.c' || echo '$(srcdir)/'`progress.c partclone_xfs-progress.obj: progress.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-progress.obj -MD -MP -MF $(DEPDIR)/partclone_xfs-progress.Tpo -c -o partclone_xfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-progress.Tpo $(DEPDIR)/partclone_xfs-progress.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='progress.c' object='partclone_xfs-progress.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-progress.obj `if test -f 'progress.c'; then $(CYGPATH_W) 'progress.c'; else $(CYGPATH_W) '$(srcdir)/progress.c'; fi` partclone_xfs-xfsclone.o: xfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-xfsclone.o -MD -MP -MF $(DEPDIR)/partclone_xfs-xfsclone.Tpo -c -o partclone_xfs-xfsclone.o `test -f 'xfsclone.c' || echo '$(srcdir)/'`xfsclone.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-xfsclone.Tpo $(DEPDIR)/partclone_xfs-xfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xfsclone.c' object='partclone_xfs-xfsclone.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-xfsclone.o `test -f 'xfsclone.c' || echo '$(srcdir)/'`xfsclone.c partclone_xfs-xfsclone.obj: xfsclone.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -MT partclone_xfs-xfsclone.obj -MD -MP -MF $(DEPDIR)/partclone_xfs-xfsclone.Tpo -c -o partclone_xfs-xfsclone.obj `if test -f 'xfsclone.c'; then $(CYGPATH_W) 'xfsclone.c'; else $(CYGPATH_W) '$(srcdir)/xfsclone.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/partclone_xfs-xfsclone.Tpo $(DEPDIR)/partclone_xfs-xfsclone.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xfsclone.c' object='partclone_xfs-xfsclone.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(partclone_xfs_CFLAGS) $(CFLAGS) -c -o partclone_xfs-xfsclone.obj `if test -f 'xfsclone.c'; then $(CYGPATH_W) 'xfsclone.c'; else $(CYGPATH_W) '$(srcdir)/xfsclone.c'; fi` 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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 installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile 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-local uninstall-sbinPROGRAMS .MAKE: install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-sbinPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am 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-local \ uninstall-sbinPROGRAMS version.h: FORCE $(TOOLBOX) --update-version # Extra install-exec-hook: @ENABLE_EXTFS_TRUE@ $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext2 @ENABLE_EXTFS_TRUE@ $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext3 @ENABLE_EXTFS_TRUE@ $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext4 @ENABLE_EXTFS_TRUE@ $(LN_S) -f partclone.extfs $(DESTDIR)$(sbindir)/partclone.ext4dev @ENABLE_HFSP_TRUE@ $(LN_S) -f partclone.hfsp $(DESTDIR)$(sbindir)/partclone.hfs+ @ENABLE_HFSP_TRUE@ $(LN_S) -f partclone.hfsp $(DESTDIR)$(sbindir)/partclone.hfsplus @ENABLE_NTFS_TRUE@ $(LN_S) -f partclone.ntfsfixboot $(DESTDIR)$(sbindir)/partclone.ntfsreloc @ENABLE_FAT_TRUE@ $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.fat12 @ENABLE_FAT_TRUE@ $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.fat16 @ENABLE_FAT_TRUE@ $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.fat32 @ENABLE_FAT_TRUE@ $(LN_S) -f partclone.fat $(DESTDIR)$(sbindir)/partclone.vfat @ENABLE_VMFS_TRUE@ $(LN_S) -f partclone.vmfs $(DESTDIR)$(sbindir)/partclone.VMFS_volume_member @ENABLE_VMFS_TRUE@ $(LN_S) -f partclone.vmfs $(DESTDIR)$(sbindir)/partclone.vmfs3 # $(LN_S) -f partclone.vmfs $(DESTDIR)$(sbindir)/partclone.vmfs5 uninstall-local: @ENABLE_EXTFS_TRUE@ $(RM) -f $(sbindir)/partclone.ext4dev @ENABLE_EXTFS_TRUE@ $(RM) -f $(sbindir)/partclone.ext4 @ENABLE_EXTFS_TRUE@ $(RM) -f $(sbindir)/partclone.ext3 @ENABLE_EXTFS_TRUE@ $(RM) -f $(sbindir)/partclone.ext2 @ENABLE_HFSP_TRUE@ $(RM) -f $(sbindir)/partclone.hfs+ @ENABLE_HFSP_TRUE@ $(RM) -f $(sbindir)/partclone.hfsplus @ENABLE_FAT_TRUE@ $(RM) -f $(sbindir)/partclone.fat12 @ENABLE_FAT_TRUE@ $(RM) -f $(sbindir)/partclone.fat16 @ENABLE_FAT_TRUE@ $(RM) -f $(sbindir)/partclone.fat32 @ENABLE_FAT_TRUE@ $(RM) -f $(sbindir)/partclone.vfat @ENABLE_NTFS_TRUE@ $(RM) -f $(sbindir)/partclone.ntfsreloc @ENABLE_VMFS_TRUE@ $(RM) -f $(sbindir)/partclone.VMFS_volume_member FORCE: # 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. .NOEXPORT: partclone-0.2.51/src/bitmap.h000066400000000000000000000013061200565264100160030ustar00rootroot00000000000000#define BITS_PER_LONG ((int)sizeof(unsigned long)*8) #define LONGS(bits) (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) static inline int pc_test_bit(unsigned int nr, unsigned long *bitmap) { unsigned long offset = nr / BITS_PER_LONG; unsigned long bit = nr & (BITS_PER_LONG-1); return (bitmap[offset] >> bit) & 1; } static inline void pc_set_bit(unsigned int nr, unsigned long *bitmap) { unsigned long offset = nr / BITS_PER_LONG; unsigned long bit = nr & (BITS_PER_LONG-1); bitmap[offset] |= 1UL << bit; } static inline void pc_clear_bit(unsigned int nr, unsigned long *bitmap) { unsigned long offset = nr / BITS_PER_LONG; unsigned long bit = nr & (BITS_PER_LONG-1); bitmap[offset] &= ~(1UL << bit); } partclone-0.2.51/src/btrfs/000077500000000000000000000000001200565264100154765ustar00rootroot00000000000000partclone-0.2.51/src/btrfs/COPYING000066400000000000000000000431341200565264100165360ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. partclone-0.2.51/src/btrfs/crc32c.c000066400000000000000000000101761200565264100167260ustar00rootroot00000000000000/* * Copied from the kernel source code, lib/libcrc32c.c. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * */ #include "kerncompat.h" #include "crc32c.h" /* * This is the CRC-32C table * Generated with: * width = 32 bits * poly = 0x1EDC6F41 * reflect input bytes = true * reflect output bytes = true */ static const u32 crc32c_table[256] = { 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L, 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL, 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L, 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L, 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL, 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL, 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L, 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L, 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL, 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L, 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL, 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL, 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L, 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L, 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L, 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L, 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L, 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L, 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L, 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L, 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L, 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L, 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L, 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L, 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L, 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L, 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L, 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L, 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L, 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL, 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L, 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L, 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL, 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L, 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL, 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL, 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L, 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L, 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL, 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL, 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L, 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL, 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L, 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L, 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL, 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L, 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL, 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL, 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L, 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL, 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L, 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L, 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL, 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL, 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L, 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L, 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL, 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L, 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL, 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL, 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L }; /* * Steps through buffer one byte at at time, calculates reflected * crc using table. */ u32 crc32c_le(u32 crc, unsigned char const *data, size_t length) { while (length--) crc = crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8); return crc; } partclone-0.2.51/src/btrfs/crc32c.h000066400000000000000000000017051200565264100167310ustar00rootroot00000000000000/* * Copyright (C) 2007 Red Hat. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __CRC32C__ #define __CRC32C__ #include "kerncompat.h" u32 crc32c_le(u32 seed, unsigned char const *data, size_t length); #define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length) #define btrfs_crc32c crc32c #endif partclone-0.2.51/src/btrfs/ctree.c000066400000000000000000002277451200565264100167650ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "print-tree.h" static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level); static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *ins_key, struct btrfs_path *path, int data_size, int extend); static int push_node_left(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *dst, struct extent_buffer *src, int empty); static int balance_node_right(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *dst_buf, struct extent_buffer *src_buf); static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level, int slot); inline void btrfs_init_path(struct btrfs_path *p) { memset(p, 0, sizeof(*p)); } struct btrfs_path *btrfs_alloc_path(void) { struct btrfs_path *path; path = kmalloc(sizeof(struct btrfs_path), GFP_NOFS); if (path) { btrfs_init_path(path); path->reada = 0; } return path; } void btrfs_free_path(struct btrfs_path *p) { btrfs_release_path(NULL, p); kfree(p); } void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p) { int i; for (i = 0; i < BTRFS_MAX_LEVEL; i++) { if (!p->nodes[i]) continue; free_extent_buffer(p->nodes[i]); } memset(p, 0, sizeof(*p)); } static void add_root_to_dirty_list(struct btrfs_root *root) { if (root->track_dirty && list_empty(&root->dirty_list)) { list_add(&root->dirty_list, &root->fs_info->dirty_cowonly_roots); } } int btrfs_copy_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer **cow_ret, u64 new_root_objectid) { struct extent_buffer *cow; int ret = 0; int level; struct btrfs_root *new_root; struct btrfs_disk_key disk_key; new_root = kmalloc(sizeof(*new_root), GFP_NOFS); if (!new_root) return -ENOMEM; memcpy(new_root, root, sizeof(*new_root)); new_root->root_key.objectid = new_root_objectid; WARN_ON(root->ref_cows && trans->transid != root->fs_info->running_transaction->transid); WARN_ON(root->ref_cows && trans->transid != root->last_trans); level = btrfs_header_level(buf); if (level == 0) btrfs_item_key(buf, &disk_key, 0); else btrfs_node_key(buf, &disk_key, 0); cow = btrfs_alloc_free_block(trans, new_root, buf->len, new_root_objectid, &disk_key, level, buf->start, 0); if (IS_ERR(cow)) { kfree(new_root); return PTR_ERR(cow); } copy_extent_buffer(cow, buf, 0, 0, cow->len); btrfs_set_header_bytenr(cow, cow->start); btrfs_set_header_generation(cow, trans->transid); btrfs_set_header_backref_rev(cow, BTRFS_MIXED_BACKREF_REV); btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN | BTRFS_HEADER_FLAG_RELOC); if (new_root_objectid == BTRFS_TREE_RELOC_OBJECTID) btrfs_set_header_flag(cow, BTRFS_HEADER_FLAG_RELOC); else btrfs_set_header_owner(cow, new_root_objectid); write_extent_buffer(cow, root->fs_info->fsid, (unsigned long)btrfs_header_fsid(cow), BTRFS_FSID_SIZE); WARN_ON(btrfs_header_generation(buf) > trans->transid); ret = btrfs_inc_ref(trans, new_root, cow, 0); kfree(new_root); if (ret) return ret; btrfs_mark_buffer_dirty(cow); *cow_ret = cow; return 0; } /* * check if the tree block can be shared by multiple trees */ int btrfs_block_can_be_shared(struct btrfs_root *root, struct extent_buffer *buf) { /* * Tree blocks not in refernece counted trees and tree roots * are never shared. If a block was allocated after the last * snapshot and the block was not allocated by tree relocation, * we know the block is not shared. */ if (root->ref_cows && buf != root->node && buf != root->commit_root && (btrfs_header_generation(buf) <= btrfs_root_last_snapshot(&root->root_item) || btrfs_header_flag(buf, BTRFS_HEADER_FLAG_RELOC))) return 1; #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 if (root->ref_cows && btrfs_header_backref_rev(buf) < BTRFS_MIXED_BACKREF_REV) return 1; #endif return 0; } static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer *cow) { u64 refs; u64 owner; u64 flags; u64 new_flags = 0; int ret; /* * Backrefs update rules: * * Always use full backrefs for extent pointers in tree block * allocated by tree relocation. * * If a shared tree block is no longer referenced by its owner * tree (btrfs_header_owner(buf) == root->root_key.objectid), * use full backrefs for extent pointers in tree block. * * If a tree block is been relocating * (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID), * use full backrefs for extent pointers in tree block. * The reason for this is some operations (such as drop tree) * are only allowed for blocks use full backrefs. */ if (btrfs_block_can_be_shared(root, buf)) { ret = btrfs_lookup_extent_info(trans, root, buf->start, buf->len, &refs, &flags); BUG_ON(ret); BUG_ON(refs == 0); } else { refs = 1; if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID || btrfs_header_backref_rev(buf) < BTRFS_MIXED_BACKREF_REV) flags = BTRFS_BLOCK_FLAG_FULL_BACKREF; else flags = 0; } owner = btrfs_header_owner(buf); BUG_ON(!(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF) && owner == BTRFS_TREE_RELOC_OBJECTID); if (refs > 1) { if ((owner == root->root_key.objectid || root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) && !(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF)) { ret = btrfs_inc_ref(trans, root, buf, 1); BUG_ON(ret); if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) { ret = btrfs_dec_ref(trans, root, buf, 0); BUG_ON(ret); ret = btrfs_inc_ref(trans, root, cow, 1); BUG_ON(ret); } new_flags |= BTRFS_BLOCK_FLAG_FULL_BACKREF; } else { if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) ret = btrfs_inc_ref(trans, root, cow, 1); else ret = btrfs_inc_ref(trans, root, cow, 0); BUG_ON(ret); } if (new_flags != 0) { ret = btrfs_set_block_flags(trans, root, buf->start, buf->len, new_flags); BUG_ON(ret); } } else { if (flags & BTRFS_BLOCK_FLAG_FULL_BACKREF) { if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) ret = btrfs_inc_ref(trans, root, cow, 1); else ret = btrfs_inc_ref(trans, root, cow, 0); BUG_ON(ret); ret = btrfs_dec_ref(trans, root, buf, 1); BUG_ON(ret); } clean_tree_block(trans, root, buf); } return 0; } int __btrfs_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer *parent, int parent_slot, struct extent_buffer **cow_ret, u64 search_start, u64 empty_size) { u64 generation; struct extent_buffer *cow; struct btrfs_disk_key disk_key; int level; WARN_ON(root->ref_cows && trans->transid != root->fs_info->running_transaction->transid); WARN_ON(root->ref_cows && trans->transid != root->last_trans); level = btrfs_header_level(buf); generation = btrfs_header_generation(buf); if (level == 0) btrfs_item_key(buf, &disk_key, 0); else btrfs_node_key(buf, &disk_key, 0); cow = btrfs_alloc_free_block(trans, root, buf->len, root->root_key.objectid, &disk_key, level, search_start, empty_size); if (IS_ERR(cow)) return PTR_ERR(cow); copy_extent_buffer(cow, buf, 0, 0, cow->len); btrfs_set_header_bytenr(cow, cow->start); btrfs_set_header_generation(cow, trans->transid); btrfs_set_header_backref_rev(cow, BTRFS_MIXED_BACKREF_REV); btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN | BTRFS_HEADER_FLAG_RELOC); if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) btrfs_set_header_flag(cow, BTRFS_HEADER_FLAG_RELOC); else btrfs_set_header_owner(cow, root->root_key.objectid); write_extent_buffer(cow, root->fs_info->fsid, (unsigned long)btrfs_header_fsid(cow), BTRFS_FSID_SIZE); WARN_ON(btrfs_header_generation(buf) > trans->transid); update_ref_for_cow(trans, root, buf, cow); if (buf == root->node) { root->node = cow; extent_buffer_get(cow); btrfs_free_extent(trans, root, buf->start, buf->len, 0, root->root_key.objectid, level, 0); free_extent_buffer(buf); add_root_to_dirty_list(root); } else { btrfs_set_node_blockptr(parent, parent_slot, cow->start); WARN_ON(trans->transid == 0); btrfs_set_node_ptr_generation(parent, parent_slot, trans->transid); btrfs_mark_buffer_dirty(parent); WARN_ON(btrfs_header_generation(parent) != trans->transid); btrfs_free_extent(trans, root, buf->start, buf->len, 0, root->root_key.objectid, level, 1); } free_extent_buffer(buf); btrfs_mark_buffer_dirty(cow); *cow_ret = cow; return 0; } static inline int should_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf) { if (btrfs_header_generation(buf) == trans->transid && !btrfs_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN) && !(root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID && btrfs_header_flag(buf, BTRFS_HEADER_FLAG_RELOC))) return 0; return 1; } int btrfs_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer *parent, int parent_slot, struct extent_buffer **cow_ret) { u64 search_start; int ret; /* if (trans->transaction != root->fs_info->running_transaction) { printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid, root->fs_info->running_transaction->transid); WARN_ON(1); } */ if (trans->transid != root->fs_info->generation) { printk(KERN_CRIT "trans %llu running %llu\n", (unsigned long long)trans->transid, (unsigned long long)root->fs_info->generation); WARN_ON(1); } if (!should_cow_block(trans, root, buf)) { *cow_ret = buf; return 0; } search_start = buf->start & ~((u64)(1024 * 1024 * 1024) - 1); ret = __btrfs_cow_block(trans, root, buf, parent, parent_slot, cow_ret, search_start, 0); return ret; } /* static int close_blocks(u64 blocknr, u64 other, u32 blocksize) { if (blocknr < other && other - (blocknr + blocksize) < 32768) return 1; if (blocknr > other && blocknr - (other + blocksize) < 32768) return 1; return 0; } */ /* * compare two keys in a memcmp fashion */ int btrfs_comp_keys(struct btrfs_disk_key *disk, struct btrfs_key *k2) { struct btrfs_key k1; btrfs_disk_key_to_cpu(&k1, disk); if (k1.objectid > k2->objectid) return 1; if (k1.objectid < k2->objectid) return -1; if (k1.type > k2->type) return 1; if (k1.type < k2->type) return -1; if (k1.offset > k2->offset) return 1; if (k1.offset < k2->offset) return -1; return 0; } #if 0 int btrfs_realloc_node(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *parent, int start_slot, int cache_only, u64 *last_ret, struct btrfs_key *progress) { struct extent_buffer *cur; struct extent_buffer *tmp; u64 blocknr; u64 gen; u64 search_start = *last_ret; u64 last_block = 0; u64 other; u32 parent_nritems; int end_slot; int i; int err = 0; int parent_level; int uptodate; u32 blocksize; int progress_passed = 0; struct btrfs_disk_key disk_key; parent_level = btrfs_header_level(parent); if (cache_only && parent_level != 1) return 0; if (trans->transaction != root->fs_info->running_transaction) { printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid, root->fs_info->running_transaction->transid); WARN_ON(1); } if (trans->transid != root->fs_info->generation) { printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid, root->fs_info->generation); WARN_ON(1); } parent_nritems = btrfs_header_nritems(parent); blocksize = btrfs_level_size(root, parent_level - 1); end_slot = parent_nritems; if (parent_nritems == 1) return 0; for (i = start_slot; i < end_slot; i++) { int close = 1; if (!parent->map_token) { map_extent_buffer(parent, btrfs_node_key_ptr_offset(i), sizeof(struct btrfs_key_ptr), &parent->map_token, &parent->kaddr, &parent->map_start, &parent->map_len, KM_USER1); } btrfs_node_key(parent, &disk_key, i); if (!progress_passed && comp_keys(&disk_key, progress) < 0) continue; progress_passed = 1; blocknr = btrfs_node_blockptr(parent, i); gen = btrfs_node_ptr_generation(parent, i); if (last_block == 0) last_block = blocknr; if (i > 0) { other = btrfs_node_blockptr(parent, i - 1); close = close_blocks(blocknr, other, blocksize); } if (close && i < end_slot - 2) { other = btrfs_node_blockptr(parent, i + 1); close = close_blocks(blocknr, other, blocksize); } if (close) { last_block = blocknr; continue; } if (parent->map_token) { unmap_extent_buffer(parent, parent->map_token, KM_USER1); parent->map_token = NULL; } cur = btrfs_find_tree_block(root, blocknr, blocksize); if (cur) uptodate = btrfs_buffer_uptodate(cur, gen); else uptodate = 0; if (!cur || !uptodate) { if (cache_only) { free_extent_buffer(cur); continue; } if (!cur) { cur = read_tree_block(root, blocknr, blocksize, gen); } else if (!uptodate) { btrfs_read_buffer(cur, gen); } } if (search_start == 0) search_start = last_block; err = __btrfs_cow_block(trans, root, cur, parent, i, &tmp, search_start, min(16 * blocksize, (end_slot - i) * blocksize)); if (err) { free_extent_buffer(cur); break; } search_start = tmp->start; last_block = tmp->start; *last_ret = search_start; if (parent_level == 1) btrfs_clear_buffer_defrag(tmp); free_extent_buffer(tmp); } if (parent->map_token) { unmap_extent_buffer(parent, parent->map_token, KM_USER1); parent->map_token = NULL; } return err; } #endif /* * The leaf data grows from end-to-front in the node. * this returns the address of the start of the last item, * which is the stop of the leaf data stack */ static inline unsigned int leaf_data_end(struct btrfs_root *root, struct extent_buffer *leaf) { u32 nr = btrfs_header_nritems(leaf); if (nr == 0) return BTRFS_LEAF_DATA_SIZE(root); return btrfs_item_offset_nr(leaf, nr - 1); } static int check_node(struct btrfs_root *root, struct btrfs_path *path, int level) { struct extent_buffer *parent = NULL; struct extent_buffer *node = path->nodes[level]; struct btrfs_disk_key parent_key; struct btrfs_disk_key node_key; int parent_slot; int slot; struct btrfs_key cpukey; u32 nritems = btrfs_header_nritems(node); if (path->nodes[level + 1]) parent = path->nodes[level + 1]; slot = path->slots[level]; BUG_ON(nritems == 0); if (parent) { parent_slot = path->slots[level + 1]; btrfs_node_key(parent, &parent_key, parent_slot); btrfs_node_key(node, &node_key, 0); BUG_ON(memcmp(&parent_key, &node_key, sizeof(struct btrfs_disk_key))); BUG_ON(btrfs_node_blockptr(parent, parent_slot) != btrfs_header_bytenr(node)); } BUG_ON(nritems > BTRFS_NODEPTRS_PER_BLOCK(root)); if (slot != 0) { btrfs_node_key_to_cpu(node, &cpukey, slot - 1); btrfs_node_key(node, &node_key, slot); BUG_ON(btrfs_comp_keys(&node_key, &cpukey) <= 0); } if (slot < nritems - 1) { btrfs_node_key_to_cpu(node, &cpukey, slot + 1); btrfs_node_key(node, &node_key, slot); BUG_ON(btrfs_comp_keys(&node_key, &cpukey) >= 0); } return 0; } static int check_leaf(struct btrfs_root *root, struct btrfs_path *path, int level) { struct extent_buffer *leaf = path->nodes[level]; struct extent_buffer *parent = NULL; int parent_slot; struct btrfs_key cpukey; struct btrfs_disk_key parent_key; struct btrfs_disk_key leaf_key; int slot = path->slots[0]; u32 nritems = btrfs_header_nritems(leaf); if (path->nodes[level + 1]) parent = path->nodes[level + 1]; if (nritems == 0) return 0; if (parent) { parent_slot = path->slots[level + 1]; btrfs_node_key(parent, &parent_key, parent_slot); btrfs_item_key(leaf, &leaf_key, 0); BUG_ON(memcmp(&parent_key, &leaf_key, sizeof(struct btrfs_disk_key))); BUG_ON(btrfs_node_blockptr(parent, parent_slot) != btrfs_header_bytenr(leaf)); } #if 0 for (i = 0; nritems > 1 && i < nritems - 2; i++) { btrfs_item_key_to_cpu(leaf, &cpukey, i + 1); btrfs_item_key(leaf, &leaf_key, i); if (comp_keys(&leaf_key, &cpukey) >= 0) { btrfs_print_leaf(root, leaf); printk("slot %d offset bad key\n", i); BUG_ON(1); } if (btrfs_item_offset_nr(leaf, i) != btrfs_item_end_nr(leaf, i + 1)) { btrfs_print_leaf(root, leaf); printk("slot %d offset bad\n", i); BUG_ON(1); } if (i == 0) { if (btrfs_item_offset_nr(leaf, i) + btrfs_item_size_nr(leaf, i) != BTRFS_LEAF_DATA_SIZE(root)) { btrfs_print_leaf(root, leaf); printk("slot %d first offset bad\n", i); BUG_ON(1); } } } if (nritems > 0) { if (btrfs_item_size_nr(leaf, nritems - 1) > 4096) { btrfs_print_leaf(root, leaf); printk("slot %d bad size \n", nritems - 1); BUG_ON(1); } } #endif if (slot != 0 && slot < nritems - 1) { btrfs_item_key(leaf, &leaf_key, slot); btrfs_item_key_to_cpu(leaf, &cpukey, slot - 1); if (btrfs_comp_keys(&leaf_key, &cpukey) <= 0) { btrfs_print_leaf(root, leaf); printk("slot %d offset bad key\n", slot); BUG_ON(1); } if (btrfs_item_offset_nr(leaf, slot - 1) != btrfs_item_end_nr(leaf, slot)) { btrfs_print_leaf(root, leaf); printk("slot %d offset bad\n", slot); BUG_ON(1); } } if (slot < nritems - 1) { btrfs_item_key(leaf, &leaf_key, slot); btrfs_item_key_to_cpu(leaf, &cpukey, slot + 1); BUG_ON(btrfs_comp_keys(&leaf_key, &cpukey) >= 0); if (btrfs_item_offset_nr(leaf, slot) != btrfs_item_end_nr(leaf, slot + 1)) { btrfs_print_leaf(root, leaf); printk("slot %d offset bad\n", slot); BUG_ON(1); } } BUG_ON(btrfs_item_offset_nr(leaf, 0) + btrfs_item_size_nr(leaf, 0) != BTRFS_LEAF_DATA_SIZE(root)); return 0; } static int noinline check_block(struct btrfs_root *root, struct btrfs_path *path, int level) { return 0; #if 0 struct extent_buffer *buf = path->nodes[level]; if (memcmp_extent_buffer(buf, root->fs_info->fsid, (unsigned long)btrfs_header_fsid(buf), BTRFS_FSID_SIZE)) { printk("warning bad block %Lu\n", buf->start); return 1; } #endif if (level == 0) return check_leaf(root, path, level); return check_node(root, path, level); } /* * search for key in the extent_buffer. The items start at offset p, * and they are item_size apart. There are 'max' items in p. * * the slot in the array is returned via slot, and it points to * the place where you would insert key if it is not found in * the array. * * slot may point to max if the key is bigger than all of the keys */ static int generic_bin_search(struct extent_buffer *eb, unsigned long p, int item_size, struct btrfs_key *key, int max, int *slot) { int low = 0; int high = max; int mid; int ret; unsigned long offset; struct btrfs_disk_key *tmp; while(low < high) { mid = (low + high) / 2; offset = p + mid * item_size; tmp = (struct btrfs_disk_key *)(eb->data + offset); ret = btrfs_comp_keys(tmp, key); if (ret < 0) low = mid + 1; else if (ret > 0) high = mid; else { *slot = mid; return 0; } } *slot = low; return 1; } /* * simple bin_search frontend that does the right thing for * leaves vs nodes */ static int bin_search(struct extent_buffer *eb, struct btrfs_key *key, int level, int *slot) { if (level == 0) { return generic_bin_search(eb, offsetof(struct btrfs_leaf, items), sizeof(struct btrfs_item), key, btrfs_header_nritems(eb), slot); } else { return generic_bin_search(eb, offsetof(struct btrfs_node, ptrs), sizeof(struct btrfs_key_ptr), key, btrfs_header_nritems(eb), slot); } return -1; } static struct extent_buffer *read_node_slot(struct btrfs_root *root, struct extent_buffer *parent, int slot) { int level = btrfs_header_level(parent); if (slot < 0) return NULL; if (slot >= btrfs_header_nritems(parent)) return NULL; BUG_ON(level == 0); return read_tree_block(root, btrfs_node_blockptr(parent, slot), btrfs_level_size(root, level - 1), btrfs_node_ptr_generation(parent, slot)); } static int balance_level(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level) { struct extent_buffer *right = NULL; struct extent_buffer *mid; struct extent_buffer *left = NULL; struct extent_buffer *parent = NULL; int ret = 0; int wret; int pslot; int orig_slot = path->slots[level]; int err_on_enospc = 0; u64 orig_ptr; if (level == 0) return 0; mid = path->nodes[level]; WARN_ON(btrfs_header_generation(mid) != trans->transid); orig_ptr = btrfs_node_blockptr(mid, orig_slot); if (level < BTRFS_MAX_LEVEL - 1) parent = path->nodes[level + 1]; pslot = path->slots[level + 1]; /* * deal with the case where there is only one pointer in the root * by promoting the node below to a root */ if (!parent) { struct extent_buffer *child; if (btrfs_header_nritems(mid) != 1) return 0; /* promote the child to a root */ child = read_node_slot(root, mid, 0); BUG_ON(!child); ret = btrfs_cow_block(trans, root, child, mid, 0, &child); BUG_ON(ret); root->node = child; add_root_to_dirty_list(root); path->nodes[level] = NULL; clean_tree_block(trans, root, mid); wait_on_tree_block_writeback(root, mid); /* once for the path */ free_extent_buffer(mid); ret = btrfs_free_extent(trans, root, mid->start, mid->len, 0, root->root_key.objectid, level, 1); /* once for the root ptr */ free_extent_buffer(mid); return ret; } if (btrfs_header_nritems(mid) > BTRFS_NODEPTRS_PER_BLOCK(root) / 4) return 0; if (btrfs_header_nritems(mid) < 2) err_on_enospc = 1; left = read_node_slot(root, parent, pslot - 1); if (left) { wret = btrfs_cow_block(trans, root, left, parent, pslot - 1, &left); if (wret) { ret = wret; goto enospc; } } right = read_node_slot(root, parent, pslot + 1); if (right) { wret = btrfs_cow_block(trans, root, right, parent, pslot + 1, &right); if (wret) { ret = wret; goto enospc; } } /* first, try to make some room in the middle buffer */ if (left) { orig_slot += btrfs_header_nritems(left); wret = push_node_left(trans, root, left, mid, 1); if (wret < 0) ret = wret; if (btrfs_header_nritems(mid) < 2) err_on_enospc = 1; } /* * then try to empty the right most buffer into the middle */ if (right) { wret = push_node_left(trans, root, mid, right, 1); if (wret < 0 && wret != -ENOSPC) ret = wret; if (btrfs_header_nritems(right) == 0) { u64 bytenr = right->start; u32 blocksize = right->len; clean_tree_block(trans, root, right); wait_on_tree_block_writeback(root, right); free_extent_buffer(right); right = NULL; wret = del_ptr(trans, root, path, level + 1, pslot + 1); if (wret) ret = wret; wret = btrfs_free_extent(trans, root, bytenr, blocksize, 0, root->root_key.objectid, level, 0); if (wret) ret = wret; } else { struct btrfs_disk_key right_key; btrfs_node_key(right, &right_key, 0); btrfs_set_node_key(parent, &right_key, pslot + 1); btrfs_mark_buffer_dirty(parent); } } if (btrfs_header_nritems(mid) == 1) { /* * we're not allowed to leave a node with one item in the * tree during a delete. A deletion from lower in the tree * could try to delete the only pointer in this node. * So, pull some keys from the left. * There has to be a left pointer at this point because * otherwise we would have pulled some pointers from the * right */ BUG_ON(!left); wret = balance_node_right(trans, root, mid, left); if (wret < 0) { ret = wret; goto enospc; } if (wret == 1) { wret = push_node_left(trans, root, left, mid, 1); if (wret < 0) ret = wret; } BUG_ON(wret == 1); } if (btrfs_header_nritems(mid) == 0) { /* we've managed to empty the middle node, drop it */ u64 bytenr = mid->start; u32 blocksize = mid->len; clean_tree_block(trans, root, mid); wait_on_tree_block_writeback(root, mid); free_extent_buffer(mid); mid = NULL; wret = del_ptr(trans, root, path, level + 1, pslot); if (wret) ret = wret; wret = btrfs_free_extent(trans, root, bytenr, blocksize, 0, root->root_key.objectid, level, 0); if (wret) ret = wret; } else { /* update the parent key to reflect our changes */ struct btrfs_disk_key mid_key; btrfs_node_key(mid, &mid_key, 0); btrfs_set_node_key(parent, &mid_key, pslot); btrfs_mark_buffer_dirty(parent); } /* update the path */ if (left) { if (btrfs_header_nritems(left) > orig_slot) { extent_buffer_get(left); path->nodes[level] = left; path->slots[level + 1] -= 1; path->slots[level] = orig_slot; if (mid) free_extent_buffer(mid); } else { orig_slot -= btrfs_header_nritems(left); path->slots[level] = orig_slot; } } /* double check we haven't messed things up */ check_block(root, path, level); if (orig_ptr != btrfs_node_blockptr(path->nodes[level], path->slots[level])) BUG(); enospc: if (right) free_extent_buffer(right); if (left) free_extent_buffer(left); return ret; } /* returns zero if the push worked, non-zero otherwise */ static int noinline push_nodes_for_insert(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level) { struct extent_buffer *right = NULL; struct extent_buffer *mid; struct extent_buffer *left = NULL; struct extent_buffer *parent = NULL; int ret = 0; int wret; int pslot; int orig_slot = path->slots[level]; u64 orig_ptr; if (level == 0) return 1; mid = path->nodes[level]; WARN_ON(btrfs_header_generation(mid) != trans->transid); orig_ptr = btrfs_node_blockptr(mid, orig_slot); if (level < BTRFS_MAX_LEVEL - 1) parent = path->nodes[level + 1]; pslot = path->slots[level + 1]; if (!parent) return 1; left = read_node_slot(root, parent, pslot - 1); /* first, try to make some room in the middle buffer */ if (left) { u32 left_nr; left_nr = btrfs_header_nritems(left); if (left_nr >= BTRFS_NODEPTRS_PER_BLOCK(root) - 1) { wret = 1; } else { ret = btrfs_cow_block(trans, root, left, parent, pslot - 1, &left); if (ret) wret = 1; else { wret = push_node_left(trans, root, left, mid, 0); } } if (wret < 0) ret = wret; if (wret == 0) { struct btrfs_disk_key disk_key; orig_slot += left_nr; btrfs_node_key(mid, &disk_key, 0); btrfs_set_node_key(parent, &disk_key, pslot); btrfs_mark_buffer_dirty(parent); if (btrfs_header_nritems(left) > orig_slot) { path->nodes[level] = left; path->slots[level + 1] -= 1; path->slots[level] = orig_slot; free_extent_buffer(mid); } else { orig_slot -= btrfs_header_nritems(left); path->slots[level] = orig_slot; free_extent_buffer(left); } return 0; } free_extent_buffer(left); } right= read_node_slot(root, parent, pslot + 1); /* * then try to empty the right most buffer into the middle */ if (right) { u32 right_nr; right_nr = btrfs_header_nritems(right); if (right_nr >= BTRFS_NODEPTRS_PER_BLOCK(root) - 1) { wret = 1; } else { ret = btrfs_cow_block(trans, root, right, parent, pslot + 1, &right); if (ret) wret = 1; else { wret = balance_node_right(trans, root, right, mid); } } if (wret < 0) ret = wret; if (wret == 0) { struct btrfs_disk_key disk_key; btrfs_node_key(right, &disk_key, 0); btrfs_set_node_key(parent, &disk_key, pslot + 1); btrfs_mark_buffer_dirty(parent); if (btrfs_header_nritems(mid) <= orig_slot) { path->nodes[level] = right; path->slots[level + 1] += 1; path->slots[level] = orig_slot - btrfs_header_nritems(mid); free_extent_buffer(mid); } else { free_extent_buffer(right); } return 0; } free_extent_buffer(right); } return 1; } /* * readahead one full node of leaves */ static void reada_for_search(struct btrfs_root *root, struct btrfs_path *path, int level, int slot, u64 objectid) { struct extent_buffer *node; struct btrfs_disk_key disk_key; u32 nritems; u64 search; u64 lowest_read; u64 highest_read; u64 nread = 0; int direction = path->reada; struct extent_buffer *eb; u32 nr; u32 blocksize; u32 nscan = 0; if (level != 1) return; if (!path->nodes[level]) return; node = path->nodes[level]; search = btrfs_node_blockptr(node, slot); blocksize = btrfs_level_size(root, level - 1); eb = btrfs_find_tree_block(root, search, blocksize); if (eb) { free_extent_buffer(eb); return; } highest_read = search; lowest_read = search; nritems = btrfs_header_nritems(node); nr = slot; while(1) { if (direction < 0) { if (nr == 0) break; nr--; } else if (direction > 0) { nr++; if (nr >= nritems) break; } if (path->reada < 0 && objectid) { btrfs_node_key(node, &disk_key, nr); if (btrfs_disk_key_objectid(&disk_key) != objectid) break; } search = btrfs_node_blockptr(node, nr); if ((search >= lowest_read && search <= highest_read) || (search < lowest_read && lowest_read - search <= 32768) || (search > highest_read && search - highest_read <= 32768)) { readahead_tree_block(root, search, blocksize, btrfs_node_ptr_generation(node, nr)); nread += blocksize; } nscan++; if (path->reada < 2 && (nread > (256 * 1024) || nscan > 32)) break; if(nread > (1024 * 1024) || nscan > 128) break; if (search < lowest_read) lowest_read = search; if (search > highest_read) highest_read = search; } } /* * look for key in the tree. path is filled in with nodes along the way * if key is found, we return zero and you can find the item in the leaf * level of the path (level 0) * * If the key isn't found, the path points to the slot where it should * be inserted, and 1 is returned. If there are other errors during the * search a negative error number is returned. * * if ins_len > 0, nodes and leaves will be split as we walk down the * tree. if ins_len < 0, nodes will be merged as we walk down the tree (if * possible) */ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_path *p, int ins_len, int cow) { struct extent_buffer *b; int slot; int ret; int level; int should_reada = p->reada; u8 lowest_level = 0; lowest_level = p->lowest_level; WARN_ON(lowest_level && ins_len); WARN_ON(p->nodes[0] != NULL); /* WARN_ON(!mutex_is_locked(&root->fs_info->fs_mutex)); */ again: b = root->node; extent_buffer_get(b); while (b) { level = btrfs_header_level(b); if (cow) { int wret; wret = btrfs_cow_block(trans, root, b, p->nodes[level + 1], p->slots[level + 1], &b); if (wret) { free_extent_buffer(b); return wret; } } BUG_ON(!cow && ins_len); if (level != btrfs_header_level(b)) WARN_ON(1); level = btrfs_header_level(b); p->nodes[level] = b; ret = check_block(root, p, level); if (ret) return -1; ret = bin_search(b, key, level, &slot); if (level != 0) { if (ret && slot > 0) slot -= 1; p->slots[level] = slot; if ((p->search_for_split || ins_len > 0) && btrfs_header_nritems(b) >= BTRFS_NODEPTRS_PER_BLOCK(root) - 3) { int sret = split_node(trans, root, p, level); BUG_ON(sret > 0); if (sret) return sret; b = p->nodes[level]; slot = p->slots[level]; } else if (ins_len < 0) { int sret = balance_level(trans, root, p, level); if (sret) return sret; b = p->nodes[level]; if (!b) { btrfs_release_path(NULL, p); goto again; } slot = p->slots[level]; BUG_ON(btrfs_header_nritems(b) == 1); } /* this is only true while dropping a snapshot */ if (level == lowest_level) break; if (should_reada) reada_for_search(root, p, level, slot, key->objectid); b = read_node_slot(root, b, slot); } else { p->slots[level] = slot; if (ins_len > 0 && ins_len > btrfs_leaf_free_space(root, b)) { int sret = split_leaf(trans, root, key, p, ins_len, ret == 0); BUG_ON(sret > 0); if (sret) return sret; } return ret; } } return 1; } /* * adjust the pointers going up the tree, starting at level * making sure the right key of each node is points to 'key'. * This is used after shifting pointers to the left, so it stops * fixing up pointers when a given leaf/node is not in slot 0 of the * higher levels * * If this fails to write a tree block, it returns -1, but continues * fixing up the blocks in ram so the tree is consistent. */ static int fixup_low_keys(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_disk_key *key, int level) { int i; int ret = 0; struct extent_buffer *t; for (i = level; i < BTRFS_MAX_LEVEL; i++) { int tslot = path->slots[i]; if (!path->nodes[i]) break; t = path->nodes[i]; btrfs_set_node_key(t, key, tslot); btrfs_mark_buffer_dirty(path->nodes[i]); if (tslot != 0) break; } return ret; } /* * update item key. * * This function isn't completely safe. It's the caller's responsibility * that the new key won't break the order */ int btrfs_set_item_key_safe(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *new_key) { struct btrfs_disk_key disk_key; struct extent_buffer *eb; int slot; eb = path->nodes[0]; slot = path->slots[0]; if (slot > 0) { btrfs_item_key(eb, &disk_key, slot - 1); if (btrfs_comp_keys(&disk_key, new_key) >= 0) return -1; } if (slot < btrfs_header_nritems(eb) - 1) { btrfs_item_key(eb, &disk_key, slot + 1); if (btrfs_comp_keys(&disk_key, new_key) <= 0) return -1; } btrfs_cpu_key_to_disk(&disk_key, new_key); btrfs_set_item_key(eb, &disk_key, slot); btrfs_mark_buffer_dirty(eb); if (slot == 0) fixup_low_keys(trans, root, path, &disk_key, 1); return 0; } /* * try to push data from one node into the next node left in the * tree. * * returns 0 if some ptrs were pushed left, < 0 if there was some horrible * error, and > 0 if there was no room in the left hand block. */ static int push_node_left(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *dst, struct extent_buffer *src, int empty) { int push_items = 0; int src_nritems; int dst_nritems; int ret = 0; src_nritems = btrfs_header_nritems(src); dst_nritems = btrfs_header_nritems(dst); push_items = BTRFS_NODEPTRS_PER_BLOCK(root) - dst_nritems; WARN_ON(btrfs_header_generation(src) != trans->transid); WARN_ON(btrfs_header_generation(dst) != trans->transid); if (!empty && src_nritems <= 8) return 1; if (push_items <= 0) { return 1; } if (empty) { push_items = min(src_nritems, push_items); if (push_items < src_nritems) { /* leave at least 8 pointers in the node if * we aren't going to empty it */ if (src_nritems - push_items < 8) { if (push_items <= 8) return 1; push_items -= 8; } } } else push_items = min(src_nritems - 8, push_items); copy_extent_buffer(dst, src, btrfs_node_key_ptr_offset(dst_nritems), btrfs_node_key_ptr_offset(0), push_items * sizeof(struct btrfs_key_ptr)); if (push_items < src_nritems) { memmove_extent_buffer(src, btrfs_node_key_ptr_offset(0), btrfs_node_key_ptr_offset(push_items), (src_nritems - push_items) * sizeof(struct btrfs_key_ptr)); } btrfs_set_header_nritems(src, src_nritems - push_items); btrfs_set_header_nritems(dst, dst_nritems + push_items); btrfs_mark_buffer_dirty(src); btrfs_mark_buffer_dirty(dst); return ret; } /* * try to push data from one node into the next node right in the * tree. * * returns 0 if some ptrs were pushed, < 0 if there was some horrible * error, and > 0 if there was no room in the right hand block. * * this will only push up to 1/2 the contents of the left node over */ static int balance_node_right(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *dst, struct extent_buffer *src) { int push_items = 0; int max_push; int src_nritems; int dst_nritems; int ret = 0; WARN_ON(btrfs_header_generation(src) != trans->transid); WARN_ON(btrfs_header_generation(dst) != trans->transid); src_nritems = btrfs_header_nritems(src); dst_nritems = btrfs_header_nritems(dst); push_items = BTRFS_NODEPTRS_PER_BLOCK(root) - dst_nritems; if (push_items <= 0) { return 1; } if (src_nritems < 4) { return 1; } max_push = src_nritems / 2 + 1; /* don't try to empty the node */ if (max_push >= src_nritems) { return 1; } if (max_push < push_items) push_items = max_push; memmove_extent_buffer(dst, btrfs_node_key_ptr_offset(push_items), btrfs_node_key_ptr_offset(0), (dst_nritems) * sizeof(struct btrfs_key_ptr)); copy_extent_buffer(dst, src, btrfs_node_key_ptr_offset(0), btrfs_node_key_ptr_offset(src_nritems - push_items), push_items * sizeof(struct btrfs_key_ptr)); btrfs_set_header_nritems(src, src_nritems - push_items); btrfs_set_header_nritems(dst, dst_nritems + push_items); btrfs_mark_buffer_dirty(src); btrfs_mark_buffer_dirty(dst); return ret; } /* * helper function to insert a new root level in the tree. * A new node is allocated, and a single item is inserted to * point to the existing root * * returns zero on success or < 0 on failure. */ static int noinline insert_new_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level) { u64 lower_gen; struct extent_buffer *lower; struct extent_buffer *c; struct extent_buffer *old; struct btrfs_disk_key lower_key; BUG_ON(path->nodes[level]); BUG_ON(path->nodes[level-1] != root->node); lower = path->nodes[level-1]; if (level == 1) btrfs_item_key(lower, &lower_key, 0); else btrfs_node_key(lower, &lower_key, 0); c = btrfs_alloc_free_block(trans, root, root->nodesize, root->root_key.objectid, &lower_key, level, root->node->start, 0); if (IS_ERR(c)) return PTR_ERR(c); memset_extent_buffer(c, 0, 0, sizeof(struct btrfs_header)); btrfs_set_header_nritems(c, 1); btrfs_set_header_level(c, level); btrfs_set_header_bytenr(c, c->start); btrfs_set_header_generation(c, trans->transid); btrfs_set_header_backref_rev(c, BTRFS_MIXED_BACKREF_REV); btrfs_set_header_owner(c, root->root_key.objectid); write_extent_buffer(c, root->fs_info->fsid, (unsigned long)btrfs_header_fsid(c), BTRFS_FSID_SIZE); write_extent_buffer(c, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(c), BTRFS_UUID_SIZE); btrfs_set_node_key(c, &lower_key, 0); btrfs_set_node_blockptr(c, 0, lower->start); lower_gen = btrfs_header_generation(lower); WARN_ON(lower_gen != trans->transid); btrfs_set_node_ptr_generation(c, 0, lower_gen); btrfs_mark_buffer_dirty(c); old = root->node; root->node = c; /* the super has an extra ref to root->node */ free_extent_buffer(old); add_root_to_dirty_list(root); extent_buffer_get(c); path->nodes[level] = c; path->slots[level] = 0; return 0; } /* * worker function to insert a single pointer in a node. * the node should have enough room for the pointer already * * slot and level indicate where you want the key to go, and * blocknr is the block the key points to. * * returns zero on success and < 0 on any error */ static int insert_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_disk_key *key, u64 bytenr, int slot, int level) { struct extent_buffer *lower; int nritems; BUG_ON(!path->nodes[level]); lower = path->nodes[level]; nritems = btrfs_header_nritems(lower); if (slot > nritems) BUG(); if (nritems == BTRFS_NODEPTRS_PER_BLOCK(root)) BUG(); if (slot != nritems) { memmove_extent_buffer(lower, btrfs_node_key_ptr_offset(slot + 1), btrfs_node_key_ptr_offset(slot), (nritems - slot) * sizeof(struct btrfs_key_ptr)); } btrfs_set_node_key(lower, key, slot); btrfs_set_node_blockptr(lower, slot, bytenr); WARN_ON(trans->transid == 0); btrfs_set_node_ptr_generation(lower, slot, trans->transid); btrfs_set_header_nritems(lower, nritems + 1); btrfs_mark_buffer_dirty(lower); return 0; } /* * split the node at the specified level in path in two. * The path is corrected to point to the appropriate node after the split * * Before splitting this tries to make some room in the node by pushing * left and right, if either one works, it returns right away. * * returns 0 on success and < 0 on failure */ static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level) { struct extent_buffer *c; struct extent_buffer *split; struct btrfs_disk_key disk_key; int mid; int ret; int wret; u32 c_nritems; c = path->nodes[level]; WARN_ON(btrfs_header_generation(c) != trans->transid); if (c == root->node) { /* trying to split the root, lets make a new one */ ret = insert_new_root(trans, root, path, level + 1); if (ret) return ret; } else { ret = push_nodes_for_insert(trans, root, path, level); c = path->nodes[level]; if (!ret && btrfs_header_nritems(c) < BTRFS_NODEPTRS_PER_BLOCK(root) - 3) return 0; if (ret < 0) return ret; } c_nritems = btrfs_header_nritems(c); mid = (c_nritems + 1) / 2; btrfs_node_key(c, &disk_key, mid); split = btrfs_alloc_free_block(trans, root, root->nodesize, root->root_key.objectid, &disk_key, level, c->start, 0); if (IS_ERR(split)) return PTR_ERR(split); memset_extent_buffer(split, 0, 0, sizeof(struct btrfs_header)); btrfs_set_header_level(split, btrfs_header_level(c)); btrfs_set_header_bytenr(split, split->start); btrfs_set_header_generation(split, trans->transid); btrfs_set_header_backref_rev(split, BTRFS_MIXED_BACKREF_REV); btrfs_set_header_owner(split, root->root_key.objectid); write_extent_buffer(split, root->fs_info->fsid, (unsigned long)btrfs_header_fsid(split), BTRFS_FSID_SIZE); write_extent_buffer(split, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(split), BTRFS_UUID_SIZE); copy_extent_buffer(split, c, btrfs_node_key_ptr_offset(0), btrfs_node_key_ptr_offset(mid), (c_nritems - mid) * sizeof(struct btrfs_key_ptr)); btrfs_set_header_nritems(split, c_nritems - mid); btrfs_set_header_nritems(c, mid); ret = 0; btrfs_mark_buffer_dirty(c); btrfs_mark_buffer_dirty(split); wret = insert_ptr(trans, root, path, &disk_key, split->start, path->slots[level + 1] + 1, level + 1); if (wret) ret = wret; if (path->slots[level] >= mid) { path->slots[level] -= mid; free_extent_buffer(c); path->nodes[level] = split; path->slots[level + 1] += 1; } else { free_extent_buffer(split); } return ret; } /* * how many bytes are required to store the items in a leaf. start * and nr indicate which items in the leaf to check. This totals up the * space used both by the item structs and the item data */ static int leaf_space_used(struct extent_buffer *l, int start, int nr) { int data_len; int nritems = btrfs_header_nritems(l); int end = min(nritems, start + nr) - 1; if (!nr) return 0; data_len = btrfs_item_end_nr(l, start); data_len = data_len - btrfs_item_offset_nr(l, end); data_len += sizeof(struct btrfs_item) * nr; WARN_ON(data_len < 0); return data_len; } /* * The space between the end of the leaf items and * the start of the leaf data. IOW, how much room * the leaf has left for both items and data */ int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf) { int nritems = btrfs_header_nritems(leaf); int ret; ret = BTRFS_LEAF_DATA_SIZE(root) - leaf_space_used(leaf, 0, nritems); if (ret < 0) { printk("leaf free space ret %d, leaf data size %lu, used %d nritems %d\n", ret, (unsigned long) BTRFS_LEAF_DATA_SIZE(root), leaf_space_used(leaf, 0, nritems), nritems); } return ret; } /* * push some data in the path leaf to the right, trying to free up at * least data_size bytes. returns zero if the push worked, nonzero otherwise * * returns 1 if the push failed because the other node didn't have enough * room, 0 if everything worked out and < 0 if there were major errors. */ static int push_leaf_right(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int data_size, int empty) { struct extent_buffer *left = path->nodes[0]; struct extent_buffer *right; struct extent_buffer *upper; struct btrfs_disk_key disk_key; int slot; u32 i; int free_space; int push_space = 0; int push_items = 0; struct btrfs_item *item; u32 left_nritems; u32 nr; u32 right_nritems; u32 data_end; u32 this_item_size; int ret; slot = path->slots[1]; if (!path->nodes[1]) { return 1; } upper = path->nodes[1]; if (slot >= btrfs_header_nritems(upper) - 1) return 1; right = read_node_slot(root, upper, slot + 1); free_space = btrfs_leaf_free_space(root, right); if (free_space < data_size) { free_extent_buffer(right); return 1; } /* cow and double check */ ret = btrfs_cow_block(trans, root, right, upper, slot + 1, &right); if (ret) { free_extent_buffer(right); return 1; } free_space = btrfs_leaf_free_space(root, right); if (free_space < data_size) { free_extent_buffer(right); return 1; } left_nritems = btrfs_header_nritems(left); if (left_nritems == 0) { free_extent_buffer(right); return 1; } if (empty) nr = 0; else nr = 1; i = left_nritems - 1; while (i >= nr) { item = btrfs_item_nr(left, i); if (path->slots[0] == i) push_space += data_size + sizeof(*item); this_item_size = btrfs_item_size(left, item); if (this_item_size + sizeof(*item) + push_space > free_space) break; push_items++; push_space += this_item_size + sizeof(*item); if (i == 0) break; i--; } if (push_items == 0) { free_extent_buffer(right); return 1; } if (!empty && push_items == left_nritems) WARN_ON(1); /* push left to right */ right_nritems = btrfs_header_nritems(right); push_space = btrfs_item_end_nr(left, left_nritems - push_items); push_space -= leaf_data_end(root, left); /* make room in the right data area */ data_end = leaf_data_end(root, right); memmove_extent_buffer(right, btrfs_leaf_data(right) + data_end - push_space, btrfs_leaf_data(right) + data_end, BTRFS_LEAF_DATA_SIZE(root) - data_end); /* copy from the left data area */ copy_extent_buffer(right, left, btrfs_leaf_data(right) + BTRFS_LEAF_DATA_SIZE(root) - push_space, btrfs_leaf_data(left) + leaf_data_end(root, left), push_space); memmove_extent_buffer(right, btrfs_item_nr_offset(push_items), btrfs_item_nr_offset(0), right_nritems * sizeof(struct btrfs_item)); /* copy the items from left to right */ copy_extent_buffer(right, left, btrfs_item_nr_offset(0), btrfs_item_nr_offset(left_nritems - push_items), push_items * sizeof(struct btrfs_item)); /* update the item pointers */ right_nritems += push_items; btrfs_set_header_nritems(right, right_nritems); push_space = BTRFS_LEAF_DATA_SIZE(root); for (i = 0; i < right_nritems; i++) { item = btrfs_item_nr(right, i); push_space -= btrfs_item_size(right, item); btrfs_set_item_offset(right, item, push_space); } left_nritems -= push_items; btrfs_set_header_nritems(left, left_nritems); if (left_nritems) btrfs_mark_buffer_dirty(left); btrfs_mark_buffer_dirty(right); btrfs_item_key(right, &disk_key, 0); btrfs_set_node_key(upper, &disk_key, slot + 1); btrfs_mark_buffer_dirty(upper); /* then fixup the leaf pointer in the path */ if (path->slots[0] >= left_nritems) { path->slots[0] -= left_nritems; free_extent_buffer(path->nodes[0]); path->nodes[0] = right; path->slots[1] += 1; } else { free_extent_buffer(right); } return 0; } /* * push some data in the path leaf to the left, trying to free up at * least data_size bytes. returns zero if the push worked, nonzero otherwise */ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int data_size, int empty) { struct btrfs_disk_key disk_key; struct extent_buffer *right = path->nodes[0]; struct extent_buffer *left; int slot; int i; int free_space; int push_space = 0; int push_items = 0; struct btrfs_item *item; u32 old_left_nritems; u32 right_nritems; u32 nr; int ret = 0; int wret; u32 this_item_size; u32 old_left_item_size; slot = path->slots[1]; if (slot == 0) return 1; if (!path->nodes[1]) return 1; right_nritems = btrfs_header_nritems(right); if (right_nritems == 0) { return 1; } left = read_node_slot(root, path->nodes[1], slot - 1); free_space = btrfs_leaf_free_space(root, left); if (free_space < data_size) { free_extent_buffer(left); return 1; } /* cow and double check */ ret = btrfs_cow_block(trans, root, left, path->nodes[1], slot - 1, &left); if (ret) { /* we hit -ENOSPC, but it isn't fatal here */ free_extent_buffer(left); return 1; } free_space = btrfs_leaf_free_space(root, left); if (free_space < data_size) { free_extent_buffer(left); return 1; } if (empty) nr = right_nritems; else nr = right_nritems - 1; for (i = 0; i < nr; i++) { item = btrfs_item_nr(right, i); if (path->slots[0] == i) push_space += data_size + sizeof(*item); this_item_size = btrfs_item_size(right, item); if (this_item_size + sizeof(*item) + push_space > free_space) break; push_items++; push_space += this_item_size + sizeof(*item); } if (push_items == 0) { free_extent_buffer(left); return 1; } if (!empty && push_items == btrfs_header_nritems(right)) WARN_ON(1); /* push data from right to left */ copy_extent_buffer(left, right, btrfs_item_nr_offset(btrfs_header_nritems(left)), btrfs_item_nr_offset(0), push_items * sizeof(struct btrfs_item)); push_space = BTRFS_LEAF_DATA_SIZE(root) - btrfs_item_offset_nr(right, push_items -1); copy_extent_buffer(left, right, btrfs_leaf_data(left) + leaf_data_end(root, left) - push_space, btrfs_leaf_data(right) + btrfs_item_offset_nr(right, push_items - 1), push_space); old_left_nritems = btrfs_header_nritems(left); BUG_ON(old_left_nritems < 0); old_left_item_size = btrfs_item_offset_nr(left, old_left_nritems - 1); for (i = old_left_nritems; i < old_left_nritems + push_items; i++) { u32 ioff; item = btrfs_item_nr(left, i); ioff = btrfs_item_offset(left, item); btrfs_set_item_offset(left, item, ioff - (BTRFS_LEAF_DATA_SIZE(root) - old_left_item_size)); } btrfs_set_header_nritems(left, old_left_nritems + push_items); /* fixup right node */ if (push_items > right_nritems) { printk("push items %d nr %u\n", push_items, right_nritems); WARN_ON(1); } if (push_items < right_nritems) { push_space = btrfs_item_offset_nr(right, push_items - 1) - leaf_data_end(root, right); memmove_extent_buffer(right, btrfs_leaf_data(right) + BTRFS_LEAF_DATA_SIZE(root) - push_space, btrfs_leaf_data(right) + leaf_data_end(root, right), push_space); memmove_extent_buffer(right, btrfs_item_nr_offset(0), btrfs_item_nr_offset(push_items), (btrfs_header_nritems(right) - push_items) * sizeof(struct btrfs_item)); } right_nritems -= push_items; btrfs_set_header_nritems(right, right_nritems); push_space = BTRFS_LEAF_DATA_SIZE(root); for (i = 0; i < right_nritems; i++) { item = btrfs_item_nr(right, i); push_space = push_space - btrfs_item_size(right, item); btrfs_set_item_offset(right, item, push_space); } btrfs_mark_buffer_dirty(left); if (right_nritems) btrfs_mark_buffer_dirty(right); btrfs_item_key(right, &disk_key, 0); wret = fixup_low_keys(trans, root, path, &disk_key, 1); if (wret) ret = wret; /* then fixup the leaf pointer in the path */ if (path->slots[0] < push_items) { path->slots[0] += old_left_nritems; free_extent_buffer(path->nodes[0]); path->nodes[0] = left; path->slots[1] -= 1; } else { free_extent_buffer(left); path->slots[0] -= push_items; } BUG_ON(path->slots[0] < 0); return ret; } /* * split the path's leaf in two, making sure there is at least data_size * available for the resulting leaf level of the path. * * returns 0 if all went well and < 0 on failure. */ static noinline int copy_for_split(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct extent_buffer *l, struct extent_buffer *right, int slot, int mid, int nritems) { int data_copy_size; int rt_data_off; int i; int ret = 0; int wret; struct btrfs_disk_key disk_key; nritems = nritems - mid; btrfs_set_header_nritems(right, nritems); data_copy_size = btrfs_item_end_nr(l, mid) - leaf_data_end(root, l); copy_extent_buffer(right, l, btrfs_item_nr_offset(0), btrfs_item_nr_offset(mid), nritems * sizeof(struct btrfs_item)); copy_extent_buffer(right, l, btrfs_leaf_data(right) + BTRFS_LEAF_DATA_SIZE(root) - data_copy_size, btrfs_leaf_data(l) + leaf_data_end(root, l), data_copy_size); rt_data_off = BTRFS_LEAF_DATA_SIZE(root) - btrfs_item_end_nr(l, mid); for (i = 0; i < nritems; i++) { struct btrfs_item *item = btrfs_item_nr(right, i); u32 ioff = btrfs_item_offset(right, item); btrfs_set_item_offset(right, item, ioff + rt_data_off); } btrfs_set_header_nritems(l, mid); ret = 0; btrfs_item_key(right, &disk_key, 0); wret = insert_ptr(trans, root, path, &disk_key, right->start, path->slots[1] + 1, 1); if (wret) ret = wret; btrfs_mark_buffer_dirty(right); btrfs_mark_buffer_dirty(l); BUG_ON(path->slots[0] != slot); if (mid <= slot) { free_extent_buffer(path->nodes[0]); path->nodes[0] = right; path->slots[0] -= mid; path->slots[1] += 1; } else { free_extent_buffer(right); } BUG_ON(path->slots[0] < 0); return ret; } /* * split the path's leaf in two, making sure there is at least data_size * available for the resulting leaf level of the path. * * returns 0 if all went well and < 0 on failure. */ static noinline int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *ins_key, struct btrfs_path *path, int data_size, int extend) { struct btrfs_disk_key disk_key; struct extent_buffer *l; u32 nritems; int mid; int slot; struct extent_buffer *right; int ret = 0; int wret; int split; int num_doubles = 0; /* first try to make some room by pushing left and right */ if (data_size && ins_key->type != BTRFS_DIR_ITEM_KEY) { wret = push_leaf_right(trans, root, path, data_size, 0); if (wret < 0) return wret; if (wret) { wret = push_leaf_left(trans, root, path, data_size, 0); if (wret < 0) return wret; } l = path->nodes[0]; /* did the pushes work? */ if (btrfs_leaf_free_space(root, l) >= data_size) return 0; } if (!path->nodes[1]) { ret = insert_new_root(trans, root, path, 1); if (ret) return ret; } again: split = 1; l = path->nodes[0]; slot = path->slots[0]; nritems = btrfs_header_nritems(l); mid = (nritems + 1) / 2; if (mid <= slot) { if (nritems == 1 || leaf_space_used(l, mid, nritems - mid) + data_size > BTRFS_LEAF_DATA_SIZE(root)) { if (slot >= nritems) { split = 0; } else { mid = slot; if (mid != nritems && leaf_space_used(l, mid, nritems - mid) + data_size > BTRFS_LEAF_DATA_SIZE(root)) { split = 2; } } } } else { if (leaf_space_used(l, 0, mid) + data_size > BTRFS_LEAF_DATA_SIZE(root)) { if (!extend && data_size && slot == 0) { split = 0; } else if ((extend || !data_size) && slot == 0) { mid = 1; } else { mid = slot; if (mid != nritems && leaf_space_used(l, mid, nritems - mid) + data_size > BTRFS_LEAF_DATA_SIZE(root)) { split = 2 ; } } } } if (split == 0) btrfs_cpu_key_to_disk(&disk_key, ins_key); else btrfs_item_key(l, &disk_key, mid); right = btrfs_alloc_free_block(trans, root, root->leafsize, root->root_key.objectid, &disk_key, 0, l->start, 0); if (IS_ERR(right)) { BUG_ON(1); return PTR_ERR(right); } memset_extent_buffer(right, 0, 0, sizeof(struct btrfs_header)); btrfs_set_header_bytenr(right, right->start); btrfs_set_header_generation(right, trans->transid); btrfs_set_header_backref_rev(right, BTRFS_MIXED_BACKREF_REV); btrfs_set_header_owner(right, root->root_key.objectid); btrfs_set_header_level(right, 0); write_extent_buffer(right, root->fs_info->fsid, (unsigned long)btrfs_header_fsid(right), BTRFS_FSID_SIZE); write_extent_buffer(right, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(right), BTRFS_UUID_SIZE); if (split == 0) { if (mid <= slot) { btrfs_set_header_nritems(right, 0); wret = insert_ptr(trans, root, path, &disk_key, right->start, path->slots[1] + 1, 1); if (wret) ret = wret; free_extent_buffer(path->nodes[0]); path->nodes[0] = right; path->slots[0] = 0; path->slots[1] += 1; } else { btrfs_set_header_nritems(right, 0); wret = insert_ptr(trans, root, path, &disk_key, right->start, path->slots[1], 1); if (wret) ret = wret; free_extent_buffer(path->nodes[0]); path->nodes[0] = right; path->slots[0] = 0; if (path->slots[1] == 0) { wret = fixup_low_keys(trans, root, path, &disk_key, 1); if (wret) ret = wret; } } btrfs_mark_buffer_dirty(right); return ret; } ret = copy_for_split(trans, root, path, l, right, slot, mid, nritems); BUG_ON(ret); if (split == 2) { BUG_ON(num_doubles != 0); num_doubles++; goto again; } return ret; } /* * This function splits a single item into two items, * giving 'new_key' to the new item and splitting the * old one at split_offset (from the start of the item). * * The path may be released by this operation. After * the split, the path is pointing to the old item. The * new item is going to be in the same node as the old one. * * Note, the item being split must be smaller enough to live alone on * a tree block with room for one extra struct btrfs_item * * This allows us to split the item in place, keeping a lock on the * leaf the entire time. */ int btrfs_split_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *new_key, unsigned long split_offset) { u32 item_size; struct extent_buffer *leaf; struct btrfs_key orig_key; struct btrfs_item *item; struct btrfs_item *new_item; int ret = 0; int slot; u32 nritems; u32 orig_offset; struct btrfs_disk_key disk_key; char *buf; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &orig_key, path->slots[0]); if (btrfs_leaf_free_space(root, leaf) >= sizeof(struct btrfs_item)) goto split; item_size = btrfs_item_size_nr(leaf, path->slots[0]); btrfs_release_path(root, path); path->search_for_split = 1; ret = btrfs_search_slot(trans, root, &orig_key, path, 0, 1); path->search_for_split = 0; /* if our item isn't there or got smaller, return now */ if (ret != 0 || item_size != btrfs_item_size_nr(path->nodes[0], path->slots[0])) { return -EAGAIN; } ret = split_leaf(trans, root, &orig_key, path, 0, 0); BUG_ON(ret); BUG_ON(btrfs_leaf_free_space(root, leaf) < sizeof(struct btrfs_item)); leaf = path->nodes[0]; split: item = btrfs_item_nr(leaf, path->slots[0]); orig_offset = btrfs_item_offset(leaf, item); item_size = btrfs_item_size(leaf, item); buf = kmalloc(item_size, GFP_NOFS); read_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf, path->slots[0]), item_size); slot = path->slots[0] + 1; leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); if (slot != nritems) { /* shift the items */ memmove_extent_buffer(leaf, btrfs_item_nr_offset(slot + 1), btrfs_item_nr_offset(slot), (nritems - slot) * sizeof(struct btrfs_item)); } btrfs_cpu_key_to_disk(&disk_key, new_key); btrfs_set_item_key(leaf, &disk_key, slot); new_item = btrfs_item_nr(leaf, slot); btrfs_set_item_offset(leaf, new_item, orig_offset); btrfs_set_item_size(leaf, new_item, item_size - split_offset); btrfs_set_item_offset(leaf, item, orig_offset + item_size - split_offset); btrfs_set_item_size(leaf, item, split_offset); btrfs_set_header_nritems(leaf, nritems + 1); /* write the data for the start of the original item */ write_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf, path->slots[0]), split_offset); /* write the data for the new item */ write_extent_buffer(leaf, buf + split_offset, btrfs_item_ptr_offset(leaf, slot), item_size - split_offset); btrfs_mark_buffer_dirty(leaf); ret = 0; if (btrfs_leaf_free_space(root, leaf) < 0) { btrfs_print_leaf(root, leaf); BUG(); } kfree(buf); return ret; } int btrfs_truncate_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u32 new_size, int from_end) { int ret = 0; int slot; int slot_orig; struct extent_buffer *leaf; struct btrfs_item *item; u32 nritems; unsigned int data_end; unsigned int old_data_start; unsigned int old_size; unsigned int size_diff; int i; slot_orig = path->slots[0]; leaf = path->nodes[0]; slot = path->slots[0]; old_size = btrfs_item_size_nr(leaf, slot); if (old_size == new_size) return 0; nritems = btrfs_header_nritems(leaf); data_end = leaf_data_end(root, leaf); old_data_start = btrfs_item_offset_nr(leaf, slot); size_diff = old_size - new_size; BUG_ON(slot < 0); BUG_ON(slot >= nritems); /* * item0..itemN ... dataN.offset..dataN.size .. data0.size */ /* first correct the data pointers */ for (i = slot; i < nritems; i++) { u32 ioff; item = btrfs_item_nr(leaf, i); ioff = btrfs_item_offset(leaf, item); btrfs_set_item_offset(leaf, item, ioff + size_diff); } /* shift the data */ if (from_end) { memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + data_end + size_diff, btrfs_leaf_data(leaf) + data_end, old_data_start + new_size - data_end); } else { struct btrfs_disk_key disk_key; u64 offset; btrfs_item_key(leaf, &disk_key, slot); if (btrfs_disk_key_type(&disk_key) == BTRFS_EXTENT_DATA_KEY) { unsigned long ptr; struct btrfs_file_extent_item *fi; fi = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item); fi = (struct btrfs_file_extent_item *)( (unsigned long)fi - size_diff); if (btrfs_file_extent_type(leaf, fi) == BTRFS_FILE_EXTENT_INLINE) { ptr = btrfs_item_ptr_offset(leaf, slot); memmove_extent_buffer(leaf, ptr, (unsigned long)fi, offsetof(struct btrfs_file_extent_item, disk_bytenr)); } } memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + data_end + size_diff, btrfs_leaf_data(leaf) + data_end, old_data_start - data_end); offset = btrfs_disk_key_offset(&disk_key); btrfs_set_disk_key_offset(&disk_key, offset + size_diff); btrfs_set_item_key(leaf, &disk_key, slot); if (slot == 0) fixup_low_keys(trans, root, path, &disk_key, 1); } item = btrfs_item_nr(leaf, slot); btrfs_set_item_size(leaf, item, new_size); btrfs_mark_buffer_dirty(leaf); ret = 0; if (btrfs_leaf_free_space(root, leaf) < 0) { btrfs_print_leaf(root, leaf); BUG(); } return ret; } int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u32 data_size) { int ret = 0; int slot; int slot_orig; struct extent_buffer *leaf; struct btrfs_item *item; u32 nritems; unsigned int data_end; unsigned int old_data; unsigned int old_size; int i; slot_orig = path->slots[0]; leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); data_end = leaf_data_end(root, leaf); if (btrfs_leaf_free_space(root, leaf) < data_size) { btrfs_print_leaf(root, leaf); BUG(); } slot = path->slots[0]; old_data = btrfs_item_end_nr(leaf, slot); BUG_ON(slot < 0); if (slot >= nritems) { btrfs_print_leaf(root, leaf); printk("slot %d too large, nritems %d\n", slot, nritems); BUG_ON(1); } /* * item0..itemN ... dataN.offset..dataN.size .. data0.size */ /* first correct the data pointers */ for (i = slot; i < nritems; i++) { u32 ioff; item = btrfs_item_nr(leaf, i); ioff = btrfs_item_offset(leaf, item); btrfs_set_item_offset(leaf, item, ioff - data_size); } /* shift the data */ memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + data_end - data_size, btrfs_leaf_data(leaf) + data_end, old_data - data_end); data_end = old_data; old_size = btrfs_item_size_nr(leaf, slot); item = btrfs_item_nr(leaf, slot); btrfs_set_item_size(leaf, item, old_size + data_size); btrfs_mark_buffer_dirty(leaf); ret = 0; if (btrfs_leaf_free_space(root, leaf) < 0) { btrfs_print_leaf(root, leaf); BUG(); } return ret; } /* * Given a key and some data, insert an item into the tree. * This does all the path init required, making room in the tree if needed. */ int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *cpu_key, u32 *data_size, int nr) { struct extent_buffer *leaf; struct btrfs_item *item; int ret = 0; int slot; int slot_orig; int i; u32 nritems; u32 total_size = 0; u32 total_data = 0; unsigned int data_end; struct btrfs_disk_key disk_key; for (i = 0; i < nr; i++) { total_data += data_size[i]; } /* create a root if there isn't one */ if (!root->node) BUG(); total_size = total_data + nr * sizeof(struct btrfs_item); ret = btrfs_search_slot(trans, root, cpu_key, path, total_size, 1); if (ret == 0) { return -EEXIST; } if (ret < 0) goto out; slot_orig = path->slots[0]; leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); data_end = leaf_data_end(root, leaf); if (btrfs_leaf_free_space(root, leaf) < total_size) { btrfs_print_leaf(root, leaf); printk("not enough freespace need %u have %d\n", total_size, btrfs_leaf_free_space(root, leaf)); BUG(); } slot = path->slots[0]; BUG_ON(slot < 0); if (slot != nritems) { int i; unsigned int old_data = btrfs_item_end_nr(leaf, slot); if (old_data < data_end) { btrfs_print_leaf(root, leaf); printk("slot %d old_data %d data_end %d\n", slot, old_data, data_end); BUG_ON(1); } /* * item0..itemN ... dataN.offset..dataN.size .. data0.size */ /* first correct the data pointers */ for (i = slot; i < nritems; i++) { u32 ioff; item = btrfs_item_nr(leaf, i); ioff = btrfs_item_offset(leaf, item); btrfs_set_item_offset(leaf, item, ioff - total_data); } /* shift the items */ memmove_extent_buffer(leaf, btrfs_item_nr_offset(slot + nr), btrfs_item_nr_offset(slot), (nritems - slot) * sizeof(struct btrfs_item)); /* shift the data */ memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + data_end - total_data, btrfs_leaf_data(leaf) + data_end, old_data - data_end); data_end = old_data; } /* setup the item for the new data */ for (i = 0; i < nr; i++) { btrfs_cpu_key_to_disk(&disk_key, cpu_key + i); btrfs_set_item_key(leaf, &disk_key, slot + i); item = btrfs_item_nr(leaf, slot + i); btrfs_set_item_offset(leaf, item, data_end - data_size[i]); data_end -= data_size[i]; btrfs_set_item_size(leaf, item, data_size[i]); } btrfs_set_header_nritems(leaf, nritems + nr); btrfs_mark_buffer_dirty(leaf); ret = 0; if (slot == 0) { btrfs_cpu_key_to_disk(&disk_key, cpu_key); ret = fixup_low_keys(trans, root, path, &disk_key, 1); } if (btrfs_leaf_free_space(root, leaf) < 0) { btrfs_print_leaf(root, leaf); BUG(); } out: return ret; } /* * Given a key and some data, insert an item into the tree. * This does all the path init required, making room in the tree if needed. */ int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *cpu_key, void *data, u32 data_size) { int ret = 0; struct btrfs_path *path; struct extent_buffer *leaf; unsigned long ptr; path = btrfs_alloc_path(); BUG_ON(!path); ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); if (!ret) { leaf = path->nodes[0]; ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); write_extent_buffer(leaf, data, ptr, data_size); btrfs_mark_buffer_dirty(leaf); } btrfs_free_path(path); return ret; } /* * delete the pointer from a given node. * * If the delete empties a node, the node is removed from the tree, * continuing all the way the root if required. The root is converted into * a leaf if all the nodes are emptied. */ static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level, int slot) { struct extent_buffer *parent = path->nodes[level]; u32 nritems; int ret = 0; int wret; nritems = btrfs_header_nritems(parent); if (slot != nritems -1) { memmove_extent_buffer(parent, btrfs_node_key_ptr_offset(slot), btrfs_node_key_ptr_offset(slot + 1), sizeof(struct btrfs_key_ptr) * (nritems - slot - 1)); } nritems--; btrfs_set_header_nritems(parent, nritems); if (nritems == 0 && parent == root->node) { BUG_ON(btrfs_header_level(root->node) != 1); /* just turn the root into a leaf and break */ btrfs_set_header_level(root->node, 0); } else if (slot == 0) { struct btrfs_disk_key disk_key; btrfs_node_key(parent, &disk_key, 0); wret = fixup_low_keys(trans, root, path, &disk_key, level + 1); if (wret) ret = wret; } btrfs_mark_buffer_dirty(parent); return ret; } /* * a helper function to delete the leaf pointed to by path->slots[1] and * path->nodes[1]. * * This deletes the pointer in path->nodes[1] and frees the leaf * block extent. zero is returned if it all worked out, < 0 otherwise. * * The path must have already been setup for deleting the leaf, including * all the proper balancing. path->nodes[1] must be locked. */ static noinline int btrfs_del_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct extent_buffer *leaf) { int ret; WARN_ON(btrfs_header_generation(leaf) != trans->transid); ret = del_ptr(trans, root, path, 1, path->slots[1]); if (ret) return ret; ret = btrfs_free_extent(trans, root, leaf->start, leaf->len, 0, root->root_key.objectid, 0, 0); return ret; } /* * delete the item at the leaf level in path. If that empties * the leaf, remove it from the tree */ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int slot, int nr) { struct extent_buffer *leaf; struct btrfs_item *item; int last_off; int dsize = 0; int ret = 0; int wret; int i; u32 nritems; leaf = path->nodes[0]; last_off = btrfs_item_offset_nr(leaf, slot + nr - 1); for (i = 0; i < nr; i++) dsize += btrfs_item_size_nr(leaf, slot + i); nritems = btrfs_header_nritems(leaf); if (slot + nr != nritems) { int i; int data_end = leaf_data_end(root, leaf); memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + data_end + dsize, btrfs_leaf_data(leaf) + data_end, last_off - data_end); for (i = slot + nr; i < nritems; i++) { u32 ioff; item = btrfs_item_nr(leaf, i); ioff = btrfs_item_offset(leaf, item); btrfs_set_item_offset(leaf, item, ioff + dsize); } memmove_extent_buffer(leaf, btrfs_item_nr_offset(slot), btrfs_item_nr_offset(slot + nr), sizeof(struct btrfs_item) * (nritems - slot - nr)); } btrfs_set_header_nritems(leaf, nritems - nr); nritems -= nr; /* delete the leaf if we've emptied it */ if (nritems == 0) { if (leaf == root->node) { btrfs_set_header_level(leaf, 0); } else { clean_tree_block(trans, root, leaf); wait_on_tree_block_writeback(root, leaf); wret = btrfs_del_leaf(trans, root, path, leaf); BUG_ON(ret); if (wret) ret = wret; } } else { int used = leaf_space_used(leaf, 0, nritems); if (slot == 0) { struct btrfs_disk_key disk_key; btrfs_item_key(leaf, &disk_key, 0); wret = fixup_low_keys(trans, root, path, &disk_key, 1); if (wret) ret = wret; } /* delete the leaf if it is mostly empty */ if (used < BTRFS_LEAF_DATA_SIZE(root) / 4) { /* push_leaf_left fixes the path. * make sure the path still points to our leaf * for possible call to del_ptr below */ slot = path->slots[1]; extent_buffer_get(leaf); wret = push_leaf_left(trans, root, path, 1, 1); if (wret < 0 && wret != -ENOSPC) ret = wret; if (path->nodes[0] == leaf && btrfs_header_nritems(leaf)) { wret = push_leaf_right(trans, root, path, 1, 1); if (wret < 0 && wret != -ENOSPC) ret = wret; } if (btrfs_header_nritems(leaf) == 0) { clean_tree_block(trans, root, leaf); wait_on_tree_block_writeback(root, leaf); path->slots[1] = slot; ret = btrfs_del_leaf(trans, root, path, leaf); BUG_ON(ret); free_extent_buffer(leaf); } else { btrfs_mark_buffer_dirty(leaf); free_extent_buffer(leaf); } } else { btrfs_mark_buffer_dirty(leaf); } } return ret; } /* * walk up the tree as far as required to find the previous leaf. * returns 0 if it found something or 1 if there are no lesser leaves. * returns < 0 on io errors. */ int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path) { int slot; int level = 1; struct extent_buffer *c; struct extent_buffer *next = NULL; while(level < BTRFS_MAX_LEVEL) { if (!path->nodes[level]) return 1; slot = path->slots[level]; c = path->nodes[level]; if (slot == 0) { level++; if (level == BTRFS_MAX_LEVEL) return 1; continue; } slot--; if (next) free_extent_buffer(next); next = read_node_slot(root, c, slot); break; } path->slots[level] = slot; while(1) { level--; c = path->nodes[level]; free_extent_buffer(c); slot = btrfs_header_nritems(next); if (slot != 0) slot--; path->nodes[level] = next; path->slots[level] = slot; if (!level) break; next = read_node_slot(root, next, slot); } return 0; } /* * walk up the tree as far as required to find the next leaf. * returns 0 if it found something or 1 if there are no greater leaves. * returns < 0 on io errors. */ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path) { int slot; int level = 1; struct extent_buffer *c; struct extent_buffer *next = NULL; while(level < BTRFS_MAX_LEVEL) { if (!path->nodes[level]) return 1; slot = path->slots[level] + 1; c = path->nodes[level]; if (slot >= btrfs_header_nritems(c)) { level++; if (level == BTRFS_MAX_LEVEL) return 1; continue; } if (next) free_extent_buffer(next); if (path->reada) reada_for_search(root, path, level, slot, 0); next = read_node_slot(root, c, slot); break; } path->slots[level] = slot; while(1) { level--; c = path->nodes[level]; free_extent_buffer(c); path->nodes[level] = next; path->slots[level] = 0; if (!level) break; if (path->reada) reada_for_search(root, path, level, 0, 0); next = read_node_slot(root, next, 0); } return 0; } int btrfs_previous_item(struct btrfs_root *root, struct btrfs_path *path, u64 min_objectid, int type) { struct btrfs_key found_key; struct extent_buffer *leaf; int ret; while(1) { if (path->slots[0] == 0) { ret = btrfs_prev_leaf(root, path); if (ret != 0) return ret; } else { path->slots[0]--; } leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); if (found_key.type == type) return 0; } return 1; } partclone-0.2.51/src/btrfs/ctree.h000066400000000000000000001653271200565264100167670ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __BTRFS__ #define __BTRFS__ #include "list.h" #include "kerncompat.h" #include "radix-tree.h" #include "extent-cache.h" #include "extent_io.h" struct btrfs_root; struct btrfs_trans_handle; #define BTRFS_MAGIC "_BHRfS_M" #define BTRFS_MAX_LEVEL 8 #define BTRFS_COMPAT_EXTENT_TREE_V0 /* holds pointers to all of the tree roots */ #define BTRFS_ROOT_TREE_OBJECTID 1ULL /* stores information about which extents are in use, and reference counts */ #define BTRFS_EXTENT_TREE_OBJECTID 2ULL /* * chunk tree stores translations from logical -> physical block numbering * the super block points to the chunk tree */ #define BTRFS_CHUNK_TREE_OBJECTID 3ULL /* * stores information about which areas of a given device are in use. * one per device. The tree of tree roots points to the device tree */ #define BTRFS_DEV_TREE_OBJECTID 4ULL /* one per subvolume, storing files and directories */ #define BTRFS_FS_TREE_OBJECTID 5ULL /* directory objectid inside the root tree */ #define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL /* holds checksums of all the data extents */ #define BTRFS_CSUM_TREE_OBJECTID 7ULL /* oprhan objectid for tracking unlinked/truncated files */ #define BTRFS_ORPHAN_OBJECTID -5ULL /* does write ahead logging to speed up fsyncs */ #define BTRFS_TREE_LOG_OBJECTID -6ULL #define BTRFS_TREE_LOG_FIXUP_OBJECTID -7ULL /* space balancing */ #define BTRFS_TREE_RELOC_OBJECTID -8ULL #define BTRFS_DATA_RELOC_TREE_OBJECTID -9ULL /* * extent checksums all have this objectid * this allows them to share the logging tree * for fsyncs */ #define BTRFS_EXTENT_CSUM_OBJECTID -10ULL /* dummy objectid represents multiple objectids */ #define BTRFS_MULTIPLE_OBJECTIDS -255ULL /* * All files have objectids in this range. */ #define BTRFS_FIRST_FREE_OBJECTID 256ULL #define BTRFS_LAST_FREE_OBJECTID -256ULL #define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL /* * the device items go into the chunk tree. The key is in the form * [ 1 BTRFS_DEV_ITEM_KEY device_id ] */ #define BTRFS_DEV_ITEMS_OBJECTID 1ULL /* * we can actually store much bigger names, but lets not confuse the rest * of linux */ #define BTRFS_NAME_LEN 255 /* 32 bytes in various csum fields */ #define BTRFS_CSUM_SIZE 32 /* csum types */ #define BTRFS_CSUM_TYPE_CRC32 0 /* csum types */ #define BTRFS_CSUM_TYPE_CRC32 0 static int btrfs_csum_sizes[] = { 4, 0 }; /* four bytes for CRC32 */ #define BTRFS_CRC32_SIZE 4 #define BTRFS_EMPTY_DIR_SIZE 0 #define BTRFS_FT_UNKNOWN 0 #define BTRFS_FT_REG_FILE 1 #define BTRFS_FT_DIR 2 #define BTRFS_FT_CHRDEV 3 #define BTRFS_FT_BLKDEV 4 #define BTRFS_FT_FIFO 5 #define BTRFS_FT_SOCK 6 #define BTRFS_FT_SYMLINK 7 #define BTRFS_FT_XATTR 8 #define BTRFS_FT_MAX 9 /* * the key defines the order in the tree, and so it also defines (optimal) * block layout. objectid corresonds to the inode number. The flags * tells us things about the object, and is a kind of stream selector. * so for a given inode, keys with flags of 1 might refer to the inode * data, flags of 2 may point to file data in the btree and flags == 3 * may point to extents. * * offset is the starting byte offset for this key in the stream. * * btrfs_disk_key is in disk byte order. struct btrfs_key is always * in cpu native order. Otherwise they are identical and their sizes * should be the same (ie both packed) */ struct btrfs_disk_key { __le64 objectid; u8 type; __le64 offset; } __attribute__ ((__packed__)); struct btrfs_key { u64 objectid; u8 type; u64 offset; } __attribute__ ((__packed__)); struct btrfs_mapping_tree { struct cache_tree cache_tree; }; #define BTRFS_UUID_SIZE 16 struct btrfs_dev_item { /* the internal btrfs device id */ __le64 devid; /* size of the device */ __le64 total_bytes; /* bytes used */ __le64 bytes_used; /* optimal io alignment for this device */ __le32 io_align; /* optimal io width for this device */ __le32 io_width; /* minimal io size for this device */ __le32 sector_size; /* type and info about this device */ __le64 type; /* expected generation for this device */ __le64 generation; /* * starting byte of this partition on the device, * to allowr for stripe alignment in the future */ __le64 start_offset; /* grouping information for allocation decisions */ __le32 dev_group; /* seek speed 0-100 where 100 is fastest */ u8 seek_speed; /* bandwidth 0-100 where 100 is fastest */ u8 bandwidth; /* btrfs generated uuid for this device */ u8 uuid[BTRFS_UUID_SIZE]; /* uuid of FS who owns this device */ u8 fsid[BTRFS_UUID_SIZE]; } __attribute__ ((__packed__)); struct btrfs_stripe { __le64 devid; __le64 offset; u8 dev_uuid[BTRFS_UUID_SIZE]; } __attribute__ ((__packed__)); struct btrfs_chunk { /* size of this chunk in bytes */ __le64 length; /* objectid of the root referencing this chunk */ __le64 owner; __le64 stripe_len; __le64 type; /* optimal io alignment for this chunk */ __le32 io_align; /* optimal io width for this chunk */ __le32 io_width; /* minimal io size for this chunk */ __le32 sector_size; /* 2^16 stripes is quite a lot, a second limit is the size of a single * item in the btree */ __le16 num_stripes; /* sub stripes only matter for raid10 */ __le16 sub_stripes; struct btrfs_stripe stripe; /* additional stripes go here */ } __attribute__ ((__packed__)); static inline unsigned long btrfs_chunk_item_size(int num_stripes) { BUG_ON(num_stripes == 0); return sizeof(struct btrfs_chunk) + sizeof(struct btrfs_stripe) * (num_stripes - 1); } #define BTRFS_FSID_SIZE 16 #define BTRFS_HEADER_FLAG_WRITTEN (1ULL << 0) #define BTRFS_HEADER_FLAG_RELOC (1ULL << 1) #define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32) #define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33) #define BTRFS_BACKREF_REV_MAX 256 #define BTRFS_BACKREF_REV_SHIFT 56 #define BTRFS_BACKREF_REV_MASK (((u64)BTRFS_BACKREF_REV_MAX - 1) << \ BTRFS_BACKREF_REV_SHIFT) #define BTRFS_OLD_BACKREF_REV 0 #define BTRFS_MIXED_BACKREF_REV 1 /* * every tree block (leaf or node) starts with this header. */ struct btrfs_header { /* these first four must match the super block */ u8 csum[BTRFS_CSUM_SIZE]; u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */ __le64 bytenr; /* which block this node is supposed to live in */ __le64 flags; /* allowed to be different from the super from here on down */ u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; __le64 generation; __le64 owner; __le32 nritems; u8 level; } __attribute__ ((__packed__)); #define BTRFS_NODEPTRS_PER_BLOCK(r) (((r)->nodesize - \ sizeof(struct btrfs_header)) / \ sizeof(struct btrfs_key_ptr)) #define __BTRFS_LEAF_DATA_SIZE(bs) ((bs) - sizeof(struct btrfs_header)) #define BTRFS_LEAF_DATA_SIZE(r) (__BTRFS_LEAF_DATA_SIZE(r->leafsize)) #define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ sizeof(struct btrfs_item) - \ sizeof(struct btrfs_file_extent_item)) /* * this is a very generous portion of the super block, giving us * room to translate 14 chunks with 3 stripes each. */ #define BTRFS_SYSTEM_CHUNK_ARRAY_SIZE 2048 #define BTRFS_LABEL_SIZE 256 /* * the super block basically lists the main trees of the FS * it currently lacks any block count etc etc */ struct btrfs_super_block { u8 csum[BTRFS_CSUM_SIZE]; /* the first 3 fields must match struct btrfs_header */ u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */ __le64 bytenr; /* this block number */ __le64 flags; /* allowed to be different from the btrfs_header from here own down */ __le64 magic; __le64 generation; __le64 root; __le64 chunk_root; __le64 log_root; /* this will help find the new super based on the log root */ __le64 log_root_transid; __le64 total_bytes; __le64 bytes_used; __le64 root_dir_objectid; __le64 num_devices; __le32 sectorsize; __le32 nodesize; __le32 leafsize; __le32 stripesize; __le32 sys_chunk_array_size; __le64 chunk_root_generation; __le64 compat_flags; __le64 compat_ro_flags; __le64 incompat_flags; __le16 csum_type; u8 root_level; u8 chunk_root_level; u8 log_root_level; struct btrfs_dev_item dev_item; char label[BTRFS_LABEL_SIZE]; /* future expansion */ __le64 reserved[32]; u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE]; } __attribute__ ((__packed__)); /* * Compat flags that we support. If any incompat flags are set other than the * ones specified below then we will fail to mount */ #define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF (1ULL << 0) #define BTRFS_FEATURE_COMPAT_SUPP 0ULL #define BTRFS_FEATURE_COMPAT_RO_SUPP 0ULL #define BTRFS_FEATURE_INCOMPAT_SUPP \ BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF /* * A leaf is full of items. offset and size tell us where to find * the item in the leaf (relative to the start of the data area) */ struct btrfs_item { struct btrfs_disk_key key; __le32 offset; __le32 size; } __attribute__ ((__packed__)); /* * leaves have an item area and a data area: * [item0, item1....itemN] [free space] [dataN...data1, data0] * * The data is separate from the items to get the keys closer together * during searches. */ struct btrfs_leaf { struct btrfs_header header; struct btrfs_item items[]; } __attribute__ ((__packed__)); /* * all non-leaf blocks are nodes, they hold only keys and pointers to * other blocks */ struct btrfs_key_ptr { struct btrfs_disk_key key; __le64 blockptr; __le64 generation; } __attribute__ ((__packed__)); struct btrfs_node { struct btrfs_header header; struct btrfs_key_ptr ptrs[]; } __attribute__ ((__packed__)); /* * btrfs_paths remember the path taken from the root down to the leaf. * level 0 is always the leaf, and nodes[1...BTRFS_MAX_LEVEL] will point * to any other levels that are present. * * The slots array records the index of the item or block pointer * used while walking the tree. */ struct btrfs_path { struct extent_buffer *nodes[BTRFS_MAX_LEVEL]; int slots[BTRFS_MAX_LEVEL]; /* if there is real range locking, this locks field will change */ int locks[BTRFS_MAX_LEVEL]; int reada; /* keep some upper locks as we walk down */ int lowest_level; /* * set by btrfs_split_item, tells search_slot to keep all locks * and to force calls to keep space in the nodes */ unsigned int search_for_split:1; unsigned int keep_locks:1; unsigned int skip_locking:1; unsigned int leave_spinning:1; }; /* * items in the extent btree are used to record the objectid of the * owner of the block and the number of references */ struct btrfs_extent_item { __le64 refs; __le64 generation; __le64 flags; } __attribute__ ((__packed__)); struct btrfs_extent_item_v0 { __le32 refs; } __attribute__ ((__packed__)); #define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r) >> 4) - \ sizeof(struct btrfs_item)) #define BTRFS_EXTENT_FLAG_DATA (1ULL << 0) #define BTRFS_EXTENT_FLAG_TREE_BLOCK (1ULL << 1) /* following flags only apply to tree blocks */ /* use full backrefs for extent pointers in the block*/ #define BTRFS_BLOCK_FLAG_FULL_BACKREF (1ULL << 8) struct btrfs_tree_block_info { struct btrfs_disk_key key; u8 level; } __attribute__ ((__packed__)); struct btrfs_extent_data_ref { __le64 root; __le64 objectid; __le64 offset; __le32 count; } __attribute__ ((__packed__)); struct btrfs_shared_data_ref { __le32 count; } __attribute__ ((__packed__)); struct btrfs_extent_inline_ref { u8 type; u64 offset; } __attribute__ ((__packed__)); struct btrfs_extent_ref_v0 { __le64 root; __le64 generation; __le64 objectid; __le32 count; } __attribute__ ((__packed__)); /* dev extents record free space on individual devices. The owner * field points back to the chunk allocation mapping tree that allocated * the extent. The chunk tree uuid field is a way to double check the owner */ struct btrfs_dev_extent { __le64 chunk_tree; __le64 chunk_objectid; __le64 chunk_offset; __le64 length; u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; } __attribute__ ((__packed__)); struct btrfs_inode_ref { __le64 index; __le16 name_len; /* name goes here */ } __attribute__ ((__packed__)); struct btrfs_timespec { __le64 sec; __le32 nsec; } __attribute__ ((__packed__)); typedef enum { BTRFS_COMPRESS_NONE = 0, BTRFS_COMPRESS_ZLIB = 1, BTRFS_COMPRESS_LAST = 2, } btrfs_compression_type; /* we don't understand any encryption methods right now */ typedef enum { BTRFS_ENCRYPTION_NONE = 0, BTRFS_ENCRYPTION_LAST = 1, } btrfs_encryption_type; struct btrfs_inode_item { /* nfs style generation number */ __le64 generation; /* transid that last touched this inode */ __le64 transid; __le64 size; __le64 nbytes; __le64 block_group; __le32 nlink; __le32 uid; __le32 gid; __le32 mode; __le64 rdev; __le64 flags; /* modification sequence number for NFS */ __le64 sequence; /* * a little future expansion, for more than this we can * just grow the inode item and version it */ __le64 reserved[4]; struct btrfs_timespec atime; struct btrfs_timespec ctime; struct btrfs_timespec mtime; struct btrfs_timespec otime; } __attribute__ ((__packed__)); struct btrfs_dir_log_item { __le64 end; } __attribute__ ((__packed__)); struct btrfs_dir_item { struct btrfs_disk_key location; __le64 transid; __le16 data_len; __le16 name_len; u8 type; } __attribute__ ((__packed__)); struct btrfs_root_item { struct btrfs_inode_item inode; __le64 generation; __le64 root_dirid; __le64 bytenr; __le64 byte_limit; __le64 bytes_used; __le64 last_snapshot; __le64 flags; __le32 refs; struct btrfs_disk_key drop_progress; u8 drop_level; u8 level; } __attribute__ ((__packed__)); /* * this is used for both forward and backward root refs */ struct btrfs_root_ref { __le64 dirid; __le64 sequence; __le16 name_len; } __attribute__ ((__packed__)); #define BTRFS_FILE_EXTENT_INLINE 0 #define BTRFS_FILE_EXTENT_REG 1 #define BTRFS_FILE_EXTENT_PREALLOC 2 struct btrfs_file_extent_item { /* * transaction id that created this extent */ __le64 generation; /* * max number of bytes to hold this extent in ram * when we split a compressed extent we can't know how big * each of the resulting pieces will be. So, this is * an upper limit on the size of the extent in ram instead of * an exact limit. */ __le64 ram_bytes; /* * 32 bits for the various ways we might encode the data, * including compression and encryption. If any of these * are set to something a given disk format doesn't understand * it is treated like an incompat flag for reading and writing, * but not for stat. */ u8 compression; u8 encryption; __le16 other_encoding; /* spare for later use */ /* are we inline data or a real extent? */ u8 type; /* * disk space consumed by the extent, checksum blocks are included * in these numbers */ __le64 disk_bytenr; __le64 disk_num_bytes; /* * the logical offset in file blocks (no csums) * this extent record is for. This allows a file extent to point * into the middle of an existing extent on disk, sharing it * between two snapshots (useful if some bytes in the middle of the * extent have changed */ __le64 offset; /* * the logical number of file blocks (no csums included) */ __le64 num_bytes; } __attribute__ ((__packed__)); struct btrfs_csum_item { u8 csum; } __attribute__ ((__packed__)); /* tag for the radix tree of block groups in ram */ #define BTRFS_BLOCK_GROUP_DATA (1 << 0) #define BTRFS_BLOCK_GROUP_SYSTEM (1 << 1) #define BTRFS_BLOCK_GROUP_METADATA (1 << 2) #define BTRFS_BLOCK_GROUP_RAID0 (1 << 3) #define BTRFS_BLOCK_GROUP_RAID1 (1 << 4) #define BTRFS_BLOCK_GROUP_DUP (1 << 5) #define BTRFS_BLOCK_GROUP_RAID10 (1 << 6) struct btrfs_block_group_item { __le64 used; __le64 chunk_objectid; __le64 flags; } __attribute__ ((__packed__)); struct btrfs_space_info { u64 flags; u64 total_bytes; u64 bytes_used; u64 bytes_pinned; int full; struct list_head list; }; struct btrfs_block_group_cache { struct cache_extent cache; struct btrfs_key key; struct btrfs_block_group_item item; struct btrfs_space_info *space_info; u64 pinned; u64 flags; int cached; int ro; }; struct btrfs_extent_ops { int (*alloc_extent)(struct btrfs_root *root, u64 num_bytes, u64 hint_byte, struct btrfs_key *ins); int (*free_extent)(struct btrfs_root *root, u64 bytenr, u64 num_bytes); }; struct btrfs_device; struct btrfs_fs_devices; struct btrfs_fs_info { u8 fsid[BTRFS_FSID_SIZE]; u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; struct btrfs_root *fs_root; struct btrfs_root *extent_root; struct btrfs_root *tree_root; struct btrfs_root *chunk_root; struct btrfs_root *dev_root; struct btrfs_root *csum_root; struct cache_tree fs_root_cache; /* the log root tree is a directory of all the other log roots */ struct btrfs_root *log_root_tree; struct extent_io_tree extent_cache; struct extent_io_tree free_space_cache; struct extent_io_tree block_group_cache; struct extent_io_tree pinned_extents; struct extent_io_tree pending_del; struct extent_io_tree extent_ins; /* logical->physical extent mapping */ struct btrfs_mapping_tree mapping_tree; u64 generation; u64 last_trans_committed; u64 avail_data_alloc_bits; u64 avail_metadata_alloc_bits; u64 avail_system_alloc_bits; u64 data_alloc_profile; u64 metadata_alloc_profile; u64 system_alloc_profile; u64 alloc_start; struct btrfs_trans_handle *running_transaction; struct btrfs_super_block super_copy; struct mutex fs_mutex; u64 super_bytenr; u64 total_pinned; struct btrfs_extent_ops *extent_ops; struct list_head dirty_cowonly_roots; struct btrfs_fs_devices *fs_devices; struct list_head space_info; int system_allocs; int readonly; }; /* * in ram representation of the tree. extent_root is used for all allocations * and for the extent tree extent_root root. */ struct btrfs_root { struct extent_buffer *node; struct extent_buffer *commit_root; struct btrfs_root_item root_item; struct btrfs_key root_key; struct btrfs_fs_info *fs_info; u64 objectid; u64 last_trans; /* data allocations are done in sectorsize units */ u32 sectorsize; /* node allocations are done in nodesize units */ u32 nodesize; /* leaf allocations are done in leafsize units */ u32 leafsize; /* leaf allocations are done in leafsize units */ u32 stripesize; int ref_cows; int track_dirty; u32 type; u64 highest_inode; u64 last_inode_alloc; /* the dirty list is only used by non-reference counted roots */ struct list_head dirty_list; struct cache_extent cache; }; /* * inode items have the data typically returned from stat and store other * info about object characteristics. There is one for every file and dir in * the FS */ #define BTRFS_INODE_ITEM_KEY 1 #define BTRFS_INODE_REF_KEY 12 #define BTRFS_XATTR_ITEM_KEY 24 #define BTRFS_ORPHAN_ITEM_KEY 48 #define BTRFS_DIR_LOG_ITEM_KEY 60 #define BTRFS_DIR_LOG_INDEX_KEY 72 /* * dir items are the name -> inode pointers in a directory. There is one * for every name in a directory. */ #define BTRFS_DIR_ITEM_KEY 84 #define BTRFS_DIR_INDEX_KEY 96 /* * extent data is for file data */ #define BTRFS_EXTENT_DATA_KEY 108 /* * csum items have the checksums for data in the extents */ #define BTRFS_CSUM_ITEM_KEY 120 /* * extent csums are stored in a separate tree and hold csums for * an entire extent on disk. */ #define BTRFS_EXTENT_CSUM_KEY 128 /* * root items point to tree roots. There are typically in the root * tree used by the super block to find all the other trees */ #define BTRFS_ROOT_ITEM_KEY 132 /* * root backrefs tie subvols and snapshots to the directory entries that * reference them */ #define BTRFS_ROOT_BACKREF_KEY 144 /* * root refs make a fast index for listing all of the snapshots and * subvolumes referenced by a given root. They point directly to the * directory item in the root that references the subvol */ #define BTRFS_ROOT_REF_KEY 156 /* * extent items are in the extent map tree. These record which blocks * are used, and how many references there are to each block */ #define BTRFS_EXTENT_ITEM_KEY 168 #define BTRFS_TREE_BLOCK_REF_KEY 176 #define BTRFS_EXTENT_DATA_REF_KEY 178 /* old style extent backrefs */ #define BTRFS_EXTENT_REF_V0_KEY 180 #define BTRFS_SHARED_BLOCK_REF_KEY 182 #define BTRFS_SHARED_DATA_REF_KEY 184 /* * block groups give us hints into the extent allocation trees. Which * blocks are free etc etc */ #define BTRFS_BLOCK_GROUP_ITEM_KEY 192 #define BTRFS_DEV_EXTENT_KEY 204 #define BTRFS_DEV_ITEM_KEY 216 #define BTRFS_CHUNK_ITEM_KEY 228 /* * string items are for debugging. They just store a short string of * data in the FS */ #define BTRFS_STRING_ITEM_KEY 253 /* * Inode flags */ #define BTRFS_INODE_NODATASUM (1 << 0) #define BTRFS_INODE_NODATACOW (1 << 1) #define BTRFS_INODE_READONLY (1 << 2) #define read_eb_member(eb, ptr, type, member, result) ( \ read_extent_buffer(eb, (char *)(result), \ ((unsigned long)(ptr)) + \ offsetof(type, member), \ sizeof(((type *)0)->member))) #define write_eb_member(eb, ptr, type, member, result) ( \ write_extent_buffer(eb, (char *)(result), \ ((unsigned long)(ptr)) + \ offsetof(type, member), \ sizeof(((type *)0)->member))) #define BTRFS_SETGET_HEADER_FUNCS(name, type, member, bits) \ static inline u##bits btrfs_##name(struct extent_buffer *eb) \ { \ struct btrfs_header *h = (struct btrfs_header *)eb->data; \ return le##bits##_to_cpu(h->member); \ } \ static inline void btrfs_set_##name(struct extent_buffer *eb, \ u##bits val) \ { \ struct btrfs_header *h = (struct btrfs_header *)eb->data; \ h->member = cpu_to_le##bits(val); \ } #define BTRFS_SETGET_FUNCS(name, type, member, bits) \ static inline u##bits btrfs_##name(struct extent_buffer *eb, \ type *s) \ { \ unsigned long offset = (unsigned long)s; \ type *p = (type *) (eb->data + offset); \ return le##bits##_to_cpu(p->member); \ } \ static inline void btrfs_set_##name(struct extent_buffer *eb, \ type *s, u##bits val) \ { \ unsigned long offset = (unsigned long)s; \ type *p = (type *) (eb->data + offset); \ p->member = cpu_to_le##bits(val); \ } #define BTRFS_SETGET_STACK_FUNCS(name, type, member, bits) \ static inline u##bits btrfs_##name(type *s) \ { \ return le##bits##_to_cpu(s->member); \ } \ static inline void btrfs_set_##name(type *s, u##bits val) \ { \ s->member = cpu_to_le##bits(val); \ } BTRFS_SETGET_FUNCS(device_type, struct btrfs_dev_item, type, 64); BTRFS_SETGET_FUNCS(device_total_bytes, struct btrfs_dev_item, total_bytes, 64); BTRFS_SETGET_FUNCS(device_bytes_used, struct btrfs_dev_item, bytes_used, 64); BTRFS_SETGET_FUNCS(device_io_align, struct btrfs_dev_item, io_align, 32); BTRFS_SETGET_FUNCS(device_io_width, struct btrfs_dev_item, io_width, 32); BTRFS_SETGET_FUNCS(device_start_offset, struct btrfs_dev_item, start_offset, 64); BTRFS_SETGET_FUNCS(device_sector_size, struct btrfs_dev_item, sector_size, 32); BTRFS_SETGET_FUNCS(device_id, struct btrfs_dev_item, devid, 64); BTRFS_SETGET_FUNCS(device_group, struct btrfs_dev_item, dev_group, 32); BTRFS_SETGET_FUNCS(device_seek_speed, struct btrfs_dev_item, seek_speed, 8); BTRFS_SETGET_FUNCS(device_bandwidth, struct btrfs_dev_item, bandwidth, 8); BTRFS_SETGET_FUNCS(device_generation, struct btrfs_dev_item, generation, 64); BTRFS_SETGET_STACK_FUNCS(stack_device_type, struct btrfs_dev_item, type, 64); BTRFS_SETGET_STACK_FUNCS(stack_device_total_bytes, struct btrfs_dev_item, total_bytes, 64); BTRFS_SETGET_STACK_FUNCS(stack_device_bytes_used, struct btrfs_dev_item, bytes_used, 64); BTRFS_SETGET_STACK_FUNCS(stack_device_io_align, struct btrfs_dev_item, io_align, 32); BTRFS_SETGET_STACK_FUNCS(stack_device_io_width, struct btrfs_dev_item, io_width, 32); BTRFS_SETGET_STACK_FUNCS(stack_device_sector_size, struct btrfs_dev_item, sector_size, 32); BTRFS_SETGET_STACK_FUNCS(stack_device_id, struct btrfs_dev_item, devid, 64); BTRFS_SETGET_STACK_FUNCS(stack_device_group, struct btrfs_dev_item, dev_group, 32); BTRFS_SETGET_STACK_FUNCS(stack_device_seek_speed, struct btrfs_dev_item, seek_speed, 8); BTRFS_SETGET_STACK_FUNCS(stack_device_bandwidth, struct btrfs_dev_item, bandwidth, 8); BTRFS_SETGET_STACK_FUNCS(stack_device_generation, struct btrfs_dev_item, generation, 64); static inline char *btrfs_device_uuid(struct btrfs_dev_item *d) { return (char *)d + offsetof(struct btrfs_dev_item, uuid); } static inline char *btrfs_device_fsid(struct btrfs_dev_item *d) { return (char *)d + offsetof(struct btrfs_dev_item, fsid); } BTRFS_SETGET_FUNCS(chunk_length, struct btrfs_chunk, length, 64); BTRFS_SETGET_FUNCS(chunk_owner, struct btrfs_chunk, owner, 64); BTRFS_SETGET_FUNCS(chunk_stripe_len, struct btrfs_chunk, stripe_len, 64); BTRFS_SETGET_FUNCS(chunk_io_align, struct btrfs_chunk, io_align, 32); BTRFS_SETGET_FUNCS(chunk_io_width, struct btrfs_chunk, io_width, 32); BTRFS_SETGET_FUNCS(chunk_sector_size, struct btrfs_chunk, sector_size, 32); BTRFS_SETGET_FUNCS(chunk_type, struct btrfs_chunk, type, 64); BTRFS_SETGET_FUNCS(chunk_num_stripes, struct btrfs_chunk, num_stripes, 16); BTRFS_SETGET_FUNCS(chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16); BTRFS_SETGET_FUNCS(stripe_devid, struct btrfs_stripe, devid, 64); BTRFS_SETGET_FUNCS(stripe_offset, struct btrfs_stripe, offset, 64); static inline char *btrfs_stripe_dev_uuid(struct btrfs_stripe *s) { return (char *)s + offsetof(struct btrfs_stripe, dev_uuid); } BTRFS_SETGET_STACK_FUNCS(stack_chunk_length, struct btrfs_chunk, length, 64); BTRFS_SETGET_STACK_FUNCS(stack_chunk_owner, struct btrfs_chunk, owner, 64); BTRFS_SETGET_STACK_FUNCS(stack_chunk_stripe_len, struct btrfs_chunk, stripe_len, 64); BTRFS_SETGET_STACK_FUNCS(stack_chunk_io_align, struct btrfs_chunk, io_align, 32); BTRFS_SETGET_STACK_FUNCS(stack_chunk_io_width, struct btrfs_chunk, io_width, 32); BTRFS_SETGET_STACK_FUNCS(stack_chunk_sector_size, struct btrfs_chunk, sector_size, 32); BTRFS_SETGET_STACK_FUNCS(stack_chunk_type, struct btrfs_chunk, type, 64); BTRFS_SETGET_STACK_FUNCS(stack_chunk_num_stripes, struct btrfs_chunk, num_stripes, 16); BTRFS_SETGET_STACK_FUNCS(stack_chunk_sub_stripes, struct btrfs_chunk, sub_stripes, 16); BTRFS_SETGET_STACK_FUNCS(stack_stripe_devid, struct btrfs_stripe, devid, 64); BTRFS_SETGET_STACK_FUNCS(stack_stripe_offset, struct btrfs_stripe, offset, 64); static inline struct btrfs_stripe *btrfs_stripe_nr(struct btrfs_chunk *c, int nr) { unsigned long offset = (unsigned long)c; offset += offsetof(struct btrfs_chunk, stripe); offset += nr * sizeof(struct btrfs_stripe); return (struct btrfs_stripe *)offset; } static inline char *btrfs_stripe_dev_uuid_nr(struct btrfs_chunk *c, int nr) { return btrfs_stripe_dev_uuid(btrfs_stripe_nr(c, nr)); } static inline u64 btrfs_stripe_offset_nr(struct extent_buffer *eb, struct btrfs_chunk *c, int nr) { return btrfs_stripe_offset(eb, btrfs_stripe_nr(c, nr)); } static inline void btrfs_set_stripe_offset_nr(struct extent_buffer *eb, struct btrfs_chunk *c, int nr, u64 val) { btrfs_set_stripe_offset(eb, btrfs_stripe_nr(c, nr), val); } static inline u64 btrfs_stripe_devid_nr(struct extent_buffer *eb, struct btrfs_chunk *c, int nr) { return btrfs_stripe_devid(eb, btrfs_stripe_nr(c, nr)); } static inline void btrfs_set_stripe_devid_nr(struct extent_buffer *eb, struct btrfs_chunk *c, int nr, u64 val) { btrfs_set_stripe_devid(eb, btrfs_stripe_nr(c, nr), val); } /* struct btrfs_block_group_item */ BTRFS_SETGET_STACK_FUNCS(block_group_used, struct btrfs_block_group_item, used, 64); BTRFS_SETGET_FUNCS(disk_block_group_used, struct btrfs_block_group_item, used, 64); BTRFS_SETGET_STACK_FUNCS(block_group_chunk_objectid, struct btrfs_block_group_item, chunk_objectid, 64); BTRFS_SETGET_FUNCS(disk_block_group_chunk_objectid, struct btrfs_block_group_item, chunk_objectid, 64); BTRFS_SETGET_FUNCS(disk_block_group_flags, struct btrfs_block_group_item, flags, 64); BTRFS_SETGET_STACK_FUNCS(block_group_flags, struct btrfs_block_group_item, flags, 64); /* struct btrfs_inode_ref */ BTRFS_SETGET_FUNCS(inode_ref_name_len, struct btrfs_inode_ref, name_len, 16); BTRFS_SETGET_FUNCS(inode_ref_index, struct btrfs_inode_ref, index, 64); /* struct btrfs_inode_item */ BTRFS_SETGET_FUNCS(inode_generation, struct btrfs_inode_item, generation, 64); BTRFS_SETGET_FUNCS(inode_sequence, struct btrfs_inode_item, sequence, 64); BTRFS_SETGET_FUNCS(inode_transid, struct btrfs_inode_item, transid, 64); BTRFS_SETGET_FUNCS(inode_size, struct btrfs_inode_item, size, 64); BTRFS_SETGET_FUNCS(inode_nbytes, struct btrfs_inode_item, nbytes, 64); BTRFS_SETGET_FUNCS(inode_block_group, struct btrfs_inode_item, block_group, 64); BTRFS_SETGET_FUNCS(inode_nlink, struct btrfs_inode_item, nlink, 32); BTRFS_SETGET_FUNCS(inode_uid, struct btrfs_inode_item, uid, 32); BTRFS_SETGET_FUNCS(inode_gid, struct btrfs_inode_item, gid, 32); BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32); BTRFS_SETGET_FUNCS(inode_rdev, struct btrfs_inode_item, rdev, 64); BTRFS_SETGET_FUNCS(inode_flags, struct btrfs_inode_item, flags, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_generation, struct btrfs_inode_item, generation, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_sequence, struct btrfs_inode_item, generation, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_size, struct btrfs_inode_item, size, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_nbytes, struct btrfs_inode_item, nbytes, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_block_group, struct btrfs_inode_item, block_group, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_nlink, struct btrfs_inode_item, nlink, 32); BTRFS_SETGET_STACK_FUNCS(stack_inode_uid, struct btrfs_inode_item, uid, 32); BTRFS_SETGET_STACK_FUNCS(stack_inode_gid, struct btrfs_inode_item, gid, 32); BTRFS_SETGET_STACK_FUNCS(stack_inode_mode, struct btrfs_inode_item, mode, 32); BTRFS_SETGET_STACK_FUNCS(stack_inode_rdev, struct btrfs_inode_item, rdev, 64); BTRFS_SETGET_STACK_FUNCS(stack_inode_flags, struct btrfs_inode_item, flags, 64); static inline struct btrfs_timespec * btrfs_inode_atime(struct btrfs_inode_item *inode_item) { unsigned long ptr = (unsigned long)inode_item; ptr += offsetof(struct btrfs_inode_item, atime); return (struct btrfs_timespec *)ptr; } static inline struct btrfs_timespec * btrfs_inode_mtime(struct btrfs_inode_item *inode_item) { unsigned long ptr = (unsigned long)inode_item; ptr += offsetof(struct btrfs_inode_item, mtime); return (struct btrfs_timespec *)ptr; } static inline struct btrfs_timespec * btrfs_inode_ctime(struct btrfs_inode_item *inode_item) { unsigned long ptr = (unsigned long)inode_item; ptr += offsetof(struct btrfs_inode_item, ctime); return (struct btrfs_timespec *)ptr; } static inline struct btrfs_timespec * btrfs_inode_otime(struct btrfs_inode_item *inode_item) { unsigned long ptr = (unsigned long)inode_item; ptr += offsetof(struct btrfs_inode_item, otime); return (struct btrfs_timespec *)ptr; } BTRFS_SETGET_FUNCS(timespec_sec, struct btrfs_timespec, sec, 64); BTRFS_SETGET_FUNCS(timespec_nsec, struct btrfs_timespec, nsec, 32); BTRFS_SETGET_STACK_FUNCS(stack_timespec_sec, struct btrfs_timespec, sec, 64); BTRFS_SETGET_STACK_FUNCS(stack_timespec_nsec, struct btrfs_timespec, nsec, 32); /* struct btrfs_dev_extent */ BTRFS_SETGET_FUNCS(dev_extent_chunk_tree, struct btrfs_dev_extent, chunk_tree, 64); BTRFS_SETGET_FUNCS(dev_extent_chunk_objectid, struct btrfs_dev_extent, chunk_objectid, 64); BTRFS_SETGET_FUNCS(dev_extent_chunk_offset, struct btrfs_dev_extent, chunk_offset, 64); BTRFS_SETGET_FUNCS(dev_extent_length, struct btrfs_dev_extent, length, 64); static inline u8 *btrfs_dev_extent_chunk_tree_uuid(struct btrfs_dev_extent *dev) { unsigned long ptr = offsetof(struct btrfs_dev_extent, chunk_tree_uuid); return (u8 *)((unsigned long)dev + ptr); } /* struct btrfs_extent_item */ BTRFS_SETGET_FUNCS(extent_refs, struct btrfs_extent_item, refs, 64); BTRFS_SETGET_FUNCS(extent_generation, struct btrfs_extent_item, generation, 64); BTRFS_SETGET_FUNCS(extent_flags, struct btrfs_extent_item, flags, 64); BTRFS_SETGET_FUNCS(extent_refs_v0, struct btrfs_extent_item_v0, refs, 32); BTRFS_SETGET_FUNCS(tree_block_level, struct btrfs_tree_block_info, level, 8); static inline void btrfs_tree_block_key(struct extent_buffer *eb, struct btrfs_tree_block_info *item, struct btrfs_disk_key *key) { read_eb_member(eb, item, struct btrfs_tree_block_info, key, key); } static inline void btrfs_set_tree_block_key(struct extent_buffer *eb, struct btrfs_tree_block_info *item, struct btrfs_disk_key *key) { write_eb_member(eb, item, struct btrfs_tree_block_info, key, key); } BTRFS_SETGET_FUNCS(extent_data_ref_root, struct btrfs_extent_data_ref, root, 64); BTRFS_SETGET_FUNCS(extent_data_ref_objectid, struct btrfs_extent_data_ref, objectid, 64); BTRFS_SETGET_FUNCS(extent_data_ref_offset, struct btrfs_extent_data_ref, offset, 64); BTRFS_SETGET_FUNCS(extent_data_ref_count, struct btrfs_extent_data_ref, count, 32); BTRFS_SETGET_FUNCS(shared_data_ref_count, struct btrfs_shared_data_ref, count, 32); BTRFS_SETGET_FUNCS(extent_inline_ref_type, struct btrfs_extent_inline_ref, type, 8); BTRFS_SETGET_FUNCS(extent_inline_ref_offset, struct btrfs_extent_inline_ref, offset, 64); static inline u32 btrfs_extent_inline_ref_size(int type) { if (type == BTRFS_TREE_BLOCK_REF_KEY || type == BTRFS_SHARED_BLOCK_REF_KEY) return sizeof(struct btrfs_extent_inline_ref); if (type == BTRFS_SHARED_DATA_REF_KEY) return sizeof(struct btrfs_shared_data_ref) + sizeof(struct btrfs_extent_inline_ref); if (type == BTRFS_EXTENT_DATA_REF_KEY) return sizeof(struct btrfs_extent_data_ref) + offsetof(struct btrfs_extent_inline_ref, offset); BUG(); return 0; } BTRFS_SETGET_FUNCS(ref_root_v0, struct btrfs_extent_ref_v0, root, 64); BTRFS_SETGET_FUNCS(ref_generation_v0, struct btrfs_extent_ref_v0, generation, 64); BTRFS_SETGET_FUNCS(ref_objectid_v0, struct btrfs_extent_ref_v0, objectid, 64); BTRFS_SETGET_FUNCS(ref_count_v0, struct btrfs_extent_ref_v0, count, 32); /* struct btrfs_node */ BTRFS_SETGET_FUNCS(key_blockptr, struct btrfs_key_ptr, blockptr, 64); BTRFS_SETGET_FUNCS(key_generation, struct btrfs_key_ptr, generation, 64); static inline u64 btrfs_node_blockptr(struct extent_buffer *eb, int nr) { unsigned long ptr; ptr = offsetof(struct btrfs_node, ptrs) + sizeof(struct btrfs_key_ptr) * nr; return btrfs_key_blockptr(eb, (struct btrfs_key_ptr *)ptr); } static inline void btrfs_set_node_blockptr(struct extent_buffer *eb, int nr, u64 val) { unsigned long ptr; ptr = offsetof(struct btrfs_node, ptrs) + sizeof(struct btrfs_key_ptr) * nr; btrfs_set_key_blockptr(eb, (struct btrfs_key_ptr *)ptr, val); } static inline u64 btrfs_node_ptr_generation(struct extent_buffer *eb, int nr) { unsigned long ptr; ptr = offsetof(struct btrfs_node, ptrs) + sizeof(struct btrfs_key_ptr) * nr; return btrfs_key_generation(eb, (struct btrfs_key_ptr *)ptr); } static inline void btrfs_set_node_ptr_generation(struct extent_buffer *eb, int nr, u64 val) { unsigned long ptr; ptr = offsetof(struct btrfs_node, ptrs) + sizeof(struct btrfs_key_ptr) * nr; btrfs_set_key_generation(eb, (struct btrfs_key_ptr *)ptr, val); } static inline unsigned long btrfs_node_key_ptr_offset(int nr) { return offsetof(struct btrfs_node, ptrs) + sizeof(struct btrfs_key_ptr) * nr; } static inline void btrfs_node_key(struct extent_buffer *eb, struct btrfs_disk_key *disk_key, int nr) { unsigned long ptr; ptr = btrfs_node_key_ptr_offset(nr); read_eb_member(eb, (struct btrfs_key_ptr *)ptr, struct btrfs_key_ptr, key, disk_key); } static inline void btrfs_set_node_key(struct extent_buffer *eb, struct btrfs_disk_key *disk_key, int nr) { unsigned long ptr; ptr = btrfs_node_key_ptr_offset(nr); write_eb_member(eb, (struct btrfs_key_ptr *)ptr, struct btrfs_key_ptr, key, disk_key); } /* struct btrfs_item */ BTRFS_SETGET_FUNCS(item_offset, struct btrfs_item, offset, 32); BTRFS_SETGET_FUNCS(item_size, struct btrfs_item, size, 32); static inline unsigned long btrfs_item_nr_offset(int nr) { return offsetof(struct btrfs_leaf, items) + sizeof(struct btrfs_item) * nr; } static inline struct btrfs_item *btrfs_item_nr(struct extent_buffer *eb, int nr) { return (struct btrfs_item *)btrfs_item_nr_offset(nr); } static inline u32 btrfs_item_end(struct extent_buffer *eb, struct btrfs_item *item) { return btrfs_item_offset(eb, item) + btrfs_item_size(eb, item); } static inline u32 btrfs_item_end_nr(struct extent_buffer *eb, int nr) { return btrfs_item_end(eb, btrfs_item_nr(eb, nr)); } static inline u32 btrfs_item_offset_nr(struct extent_buffer *eb, int nr) { return btrfs_item_offset(eb, btrfs_item_nr(eb, nr)); } static inline u32 btrfs_item_size_nr(struct extent_buffer *eb, int nr) { return btrfs_item_size(eb, btrfs_item_nr(eb, nr)); } static inline void btrfs_item_key(struct extent_buffer *eb, struct btrfs_disk_key *disk_key, int nr) { struct btrfs_item *item = btrfs_item_nr(eb, nr); read_eb_member(eb, item, struct btrfs_item, key, disk_key); } static inline void btrfs_set_item_key(struct extent_buffer *eb, struct btrfs_disk_key *disk_key, int nr) { struct btrfs_item *item = btrfs_item_nr(eb, nr); write_eb_member(eb, item, struct btrfs_item, key, disk_key); } BTRFS_SETGET_FUNCS(dir_log_end, struct btrfs_dir_log_item, end, 64); /* * struct btrfs_root_ref */ BTRFS_SETGET_FUNCS(root_ref_dirid, struct btrfs_root_ref, dirid, 64); BTRFS_SETGET_FUNCS(root_ref_sequence, struct btrfs_root_ref, sequence, 64); BTRFS_SETGET_FUNCS(root_ref_name_len, struct btrfs_root_ref, name_len, 16); /* struct btrfs_dir_item */ BTRFS_SETGET_FUNCS(dir_data_len, struct btrfs_dir_item, data_len, 16); BTRFS_SETGET_FUNCS(dir_type, struct btrfs_dir_item, type, 8); BTRFS_SETGET_FUNCS(dir_name_len, struct btrfs_dir_item, name_len, 16); BTRFS_SETGET_FUNCS(dir_transid, struct btrfs_dir_item, transid, 64); static inline void btrfs_dir_item_key(struct extent_buffer *eb, struct btrfs_dir_item *item, struct btrfs_disk_key *key) { read_eb_member(eb, item, struct btrfs_dir_item, location, key); } static inline void btrfs_set_dir_item_key(struct extent_buffer *eb, struct btrfs_dir_item *item, struct btrfs_disk_key *key) { write_eb_member(eb, item, struct btrfs_dir_item, location, key); } /* struct btrfs_disk_key */ BTRFS_SETGET_STACK_FUNCS(disk_key_objectid, struct btrfs_disk_key, objectid, 64); BTRFS_SETGET_STACK_FUNCS(disk_key_offset, struct btrfs_disk_key, offset, 64); BTRFS_SETGET_STACK_FUNCS(disk_key_type, struct btrfs_disk_key, type, 8); static inline void btrfs_disk_key_to_cpu(struct btrfs_key *cpu, struct btrfs_disk_key *disk) { cpu->offset = le64_to_cpu(disk->offset); cpu->type = disk->type; cpu->objectid = le64_to_cpu(disk->objectid); } static inline void btrfs_cpu_key_to_disk(struct btrfs_disk_key *disk, struct btrfs_key *cpu) { disk->offset = cpu_to_le64(cpu->offset); disk->type = cpu->type; disk->objectid = cpu_to_le64(cpu->objectid); } static inline void btrfs_node_key_to_cpu(struct extent_buffer *eb, struct btrfs_key *key, int nr) { struct btrfs_disk_key disk_key; btrfs_node_key(eb, &disk_key, nr); btrfs_disk_key_to_cpu(key, &disk_key); } static inline void btrfs_item_key_to_cpu(struct extent_buffer *eb, struct btrfs_key *key, int nr) { struct btrfs_disk_key disk_key; btrfs_item_key(eb, &disk_key, nr); btrfs_disk_key_to_cpu(key, &disk_key); } static inline void btrfs_dir_item_key_to_cpu(struct extent_buffer *eb, struct btrfs_dir_item *item, struct btrfs_key *key) { struct btrfs_disk_key disk_key; btrfs_dir_item_key(eb, item, &disk_key); btrfs_disk_key_to_cpu(key, &disk_key); } static inline u8 btrfs_key_type(struct btrfs_key *key) { return key->type; } static inline void btrfs_set_key_type(struct btrfs_key *key, u8 val) { key->type = val; } /* struct btrfs_header */ BTRFS_SETGET_HEADER_FUNCS(header_bytenr, struct btrfs_header, bytenr, 64); BTRFS_SETGET_HEADER_FUNCS(header_generation, struct btrfs_header, generation, 64); BTRFS_SETGET_HEADER_FUNCS(header_owner, struct btrfs_header, owner, 64); BTRFS_SETGET_HEADER_FUNCS(header_nritems, struct btrfs_header, nritems, 32); BTRFS_SETGET_HEADER_FUNCS(header_flags, struct btrfs_header, flags, 64); BTRFS_SETGET_HEADER_FUNCS(header_level, struct btrfs_header, level, 8); static inline int btrfs_header_flag(struct extent_buffer *eb, u64 flag) { return (btrfs_header_flags(eb) & flag) == flag; } static inline int btrfs_set_header_flag(struct extent_buffer *eb, u64 flag) { u64 flags = btrfs_header_flags(eb); btrfs_set_header_flags(eb, flags | flag); return (flags & flag) == flag; } static inline int btrfs_clear_header_flag(struct extent_buffer *eb, u64 flag) { u64 flags = btrfs_header_flags(eb); btrfs_set_header_flags(eb, flags & ~flag); return (flags & flag) == flag; } static inline int btrfs_header_backref_rev(struct extent_buffer *eb) { u64 flags = btrfs_header_flags(eb); return flags >> BTRFS_BACKREF_REV_SHIFT; } static inline void btrfs_set_header_backref_rev(struct extent_buffer *eb, int rev) { u64 flags = btrfs_header_flags(eb); flags &= ~BTRFS_BACKREF_REV_MASK; flags |= (u64)rev << BTRFS_BACKREF_REV_SHIFT; btrfs_set_header_flags(eb, flags); } static inline u8 *btrfs_header_fsid(struct extent_buffer *eb) { unsigned long ptr = offsetof(struct btrfs_header, fsid); return (u8 *)ptr; } static inline u8 *btrfs_header_chunk_tree_uuid(struct extent_buffer *eb) { unsigned long ptr = offsetof(struct btrfs_header, chunk_tree_uuid); return (u8 *)ptr; } static inline u8 *btrfs_super_fsid(struct extent_buffer *eb) { unsigned long ptr = offsetof(struct btrfs_super_block, fsid); return (u8 *)ptr; } static inline u8 *btrfs_header_csum(struct extent_buffer *eb) { unsigned long ptr = offsetof(struct btrfs_header, csum); return (u8 *)ptr; } static inline struct btrfs_node *btrfs_buffer_node(struct extent_buffer *eb) { return NULL; } static inline struct btrfs_leaf *btrfs_buffer_leaf(struct extent_buffer *eb) { return NULL; } static inline struct btrfs_header *btrfs_buffer_header(struct extent_buffer *eb) { return NULL; } static inline int btrfs_is_leaf(struct extent_buffer *eb) { return (btrfs_header_level(eb) == 0); } /* struct btrfs_root_item */ BTRFS_SETGET_FUNCS(disk_root_generation, struct btrfs_root_item, generation, 64); BTRFS_SETGET_FUNCS(disk_root_refs, struct btrfs_root_item, refs, 32); BTRFS_SETGET_FUNCS(disk_root_bytenr, struct btrfs_root_item, bytenr, 64); BTRFS_SETGET_FUNCS(disk_root_level, struct btrfs_root_item, level, 8); BTRFS_SETGET_STACK_FUNCS(root_generation, struct btrfs_root_item, generation, 64); BTRFS_SETGET_STACK_FUNCS(root_bytenr, struct btrfs_root_item, bytenr, 64); BTRFS_SETGET_STACK_FUNCS(root_level, struct btrfs_root_item, level, 8); BTRFS_SETGET_STACK_FUNCS(root_dirid, struct btrfs_root_item, root_dirid, 64); BTRFS_SETGET_STACK_FUNCS(root_refs, struct btrfs_root_item, refs, 32); BTRFS_SETGET_STACK_FUNCS(root_flags, struct btrfs_root_item, flags, 64); BTRFS_SETGET_STACK_FUNCS(root_used, struct btrfs_root_item, bytes_used, 64); BTRFS_SETGET_STACK_FUNCS(root_limit, struct btrfs_root_item, byte_limit, 64); BTRFS_SETGET_STACK_FUNCS(root_last_snapshot, struct btrfs_root_item, last_snapshot, 64); /* struct btrfs_super_block */ BTRFS_SETGET_STACK_FUNCS(super_bytenr, struct btrfs_super_block, bytenr, 64); BTRFS_SETGET_STACK_FUNCS(super_flags, struct btrfs_super_block, flags, 64); BTRFS_SETGET_STACK_FUNCS(super_generation, struct btrfs_super_block, generation, 64); BTRFS_SETGET_STACK_FUNCS(super_root, struct btrfs_super_block, root, 64); BTRFS_SETGET_STACK_FUNCS(super_sys_array_size, struct btrfs_super_block, sys_chunk_array_size, 32); BTRFS_SETGET_STACK_FUNCS(super_chunk_root_generation, struct btrfs_super_block, chunk_root_generation, 64); BTRFS_SETGET_STACK_FUNCS(super_root_level, struct btrfs_super_block, root_level, 8); BTRFS_SETGET_STACK_FUNCS(super_chunk_root, struct btrfs_super_block, chunk_root, 64); BTRFS_SETGET_STACK_FUNCS(super_chunk_root_level, struct btrfs_super_block, chunk_root_level, 8); BTRFS_SETGET_STACK_FUNCS(super_log_root, struct btrfs_super_block, log_root, 64); BTRFS_SETGET_STACK_FUNCS(super_log_root_transid, struct btrfs_super_block, log_root_transid, 64); BTRFS_SETGET_STACK_FUNCS(super_log_root_level, struct btrfs_super_block, log_root_level, 8); BTRFS_SETGET_STACK_FUNCS(super_total_bytes, struct btrfs_super_block, total_bytes, 64); BTRFS_SETGET_STACK_FUNCS(super_bytes_used, struct btrfs_super_block, bytes_used, 64); BTRFS_SETGET_STACK_FUNCS(super_sectorsize, struct btrfs_super_block, sectorsize, 32); BTRFS_SETGET_STACK_FUNCS(super_nodesize, struct btrfs_super_block, nodesize, 32); BTRFS_SETGET_STACK_FUNCS(super_leafsize, struct btrfs_super_block, leafsize, 32); BTRFS_SETGET_STACK_FUNCS(super_stripesize, struct btrfs_super_block, stripesize, 32); BTRFS_SETGET_STACK_FUNCS(super_root_dir, struct btrfs_super_block, root_dir_objectid, 64); BTRFS_SETGET_STACK_FUNCS(super_num_devices, struct btrfs_super_block, num_devices, 64); BTRFS_SETGET_STACK_FUNCS(super_compat_flags, struct btrfs_super_block, compat_flags, 64); BTRFS_SETGET_STACK_FUNCS(super_compat_ro_flags, struct btrfs_super_block, compat_flags, 64); BTRFS_SETGET_STACK_FUNCS(super_incompat_flags, struct btrfs_super_block, incompat_flags, 64); BTRFS_SETGET_STACK_FUNCS(super_csum_type, struct btrfs_super_block, csum_type, 16); static inline int btrfs_super_csum_size(struct btrfs_super_block *s) { int t = btrfs_super_csum_type(s); BUG_ON(t >= ARRAY_SIZE(btrfs_csum_sizes)); return btrfs_csum_sizes[t]; } static inline unsigned long btrfs_leaf_data(struct extent_buffer *l) { return offsetof(struct btrfs_leaf, items); } /* struct btrfs_file_extent_item */ BTRFS_SETGET_FUNCS(file_extent_type, struct btrfs_file_extent_item, type, 8); static inline unsigned long btrfs_file_extent_inline_start(struct btrfs_file_extent_item *e) { unsigned long offset = (unsigned long)e; offset += offsetof(struct btrfs_file_extent_item, disk_bytenr); return offset; } static inline u32 btrfs_file_extent_calc_inline_size(u32 datasize) { return offsetof(struct btrfs_file_extent_item, disk_bytenr) + datasize; } BTRFS_SETGET_FUNCS(file_extent_disk_bytenr, struct btrfs_file_extent_item, disk_bytenr, 64); BTRFS_SETGET_FUNCS(file_extent_generation, struct btrfs_file_extent_item, generation, 64); BTRFS_SETGET_FUNCS(file_extent_disk_num_bytes, struct btrfs_file_extent_item, disk_num_bytes, 64); BTRFS_SETGET_FUNCS(file_extent_offset, struct btrfs_file_extent_item, offset, 64); BTRFS_SETGET_FUNCS(file_extent_num_bytes, struct btrfs_file_extent_item, num_bytes, 64); BTRFS_SETGET_FUNCS(file_extent_ram_bytes, struct btrfs_file_extent_item, ram_bytes, 64); BTRFS_SETGET_FUNCS(file_extent_compression, struct btrfs_file_extent_item, compression, 8); BTRFS_SETGET_FUNCS(file_extent_encryption, struct btrfs_file_extent_item, encryption, 8); BTRFS_SETGET_FUNCS(file_extent_other_encoding, struct btrfs_file_extent_item, other_encoding, 16); /* this returns the number of file bytes represented by the inline item. * If an item is compressed, this is the uncompressed size */ static inline u32 btrfs_file_extent_inline_len(struct extent_buffer *eb, struct btrfs_file_extent_item *e) { return btrfs_file_extent_ram_bytes(eb, e); } /* * this returns the number of bytes used by the item on disk, minus the * size of any extent headers. If a file is compressed on disk, this is * the compressed size */ static inline u32 btrfs_file_extent_inline_item_len(struct extent_buffer *eb, struct btrfs_item *e) { unsigned long offset; offset = offsetof(struct btrfs_file_extent_item, disk_bytenr); return btrfs_item_size(eb, e) - offset; } static inline u32 btrfs_level_size(struct btrfs_root *root, int level) { if (level == 0) return root->leafsize; return root->nodesize; } /* helper function to cast into the data area of the leaf. */ #define btrfs_item_ptr(leaf, slot, type) \ ((type *)(btrfs_leaf_data(leaf) + \ btrfs_item_offset_nr(leaf, slot))) #define btrfs_item_ptr_offset(leaf, slot) \ ((unsigned long)(btrfs_leaf_data(leaf) + \ btrfs_item_offset_nr(leaf, slot))) /* extent-tree.c */ int btrfs_extent_post_op(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_copy_pinned(struct btrfs_root *root, struct extent_io_tree *copy); struct btrfs_block_group_cache *btrfs_lookup_block_group(struct btrfs_fs_info *info, u64 bytenr); struct btrfs_block_group_cache *btrfs_find_block_group(struct btrfs_root *root, struct btrfs_block_group_cache *hint, u64 search_start, int data, int owner); struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u32 blocksize, u64 root_objectid, struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size); int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 num_bytes, u64 parent, u64 root_objectid, u64 ref_generation, u64 owner, u64 empty_size, u64 hint_byte, u64 search_end, struct btrfs_key *ins, int data); int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 *refs, u64 *flags); int btrfs_set_block_flags(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 flags); int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, int record_parent); int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, int record_parent); int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner, u64 offset); int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_io_tree *unpin); int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 ref_generation, u64 owner_objectid); int btrfs_update_extent_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 orig_parent, u64 parent, u64 root_objectid, u64 ref_generation, u64 owner_objectid); int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_free_block_groups(struct btrfs_fs_info *info); int btrfs_read_block_groups(struct btrfs_root *root); int btrfs_make_block_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytes_used, u64 type, u64 chunk_objectid, u64 chunk_offset, u64 size); int btrfs_make_block_groups(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_update_block_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num, int alloc, int mark_free); /* ctree.c */ int btrfs_previous_item(struct btrfs_root *root, struct btrfs_path *path, u64 min_objectid, int type); int btrfs_comp_keys(struct btrfs_disk_key *disk, struct btrfs_key *k2); int btrfs_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer *parent, int parent_slot, struct extent_buffer **cow_ret); int __btrfs_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer *parent, int parent_slot, struct extent_buffer **cow_ret, u64 search_start, u64 empty_size); int btrfs_copy_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer **cow_ret, u64 new_root_objectid); int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u32 data_size); int btrfs_truncate_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u32 new_size, int from_end); int btrfs_split_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *new_key, unsigned long split_offset); int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_path *p, int ins_len, int cow); int btrfs_realloc_node(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *parent, int start_slot, int cache_only, u64 *last_ret, struct btrfs_key *progress); void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p); struct btrfs_path *btrfs_alloc_path(void); void btrfs_free_path(struct btrfs_path *p); void btrfs_init_path(struct btrfs_path *p); int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int slot, int nr); static inline int btrfs_del_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path) { return btrfs_del_items(trans, root, path, path->slots[0], 1); } int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, void *data, u32 data_size); int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *cpu_key, u32 *data_size, int nr); static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *key, u32 data_size) { return btrfs_insert_empty_items(trans, root, path, key, &data_size, 1); } int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_set_item_key_safe(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *new_key); /* root-item.c */ int btrfs_add_root_ref(struct btrfs_trans_handle *trans, struct btrfs_root *tree_root, u64 root_id, u8 type, u64 ref_id, u64 dirid, u64 sequence, const char *name, int name_len); int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key); int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_root_item *item); int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_root_item *item); int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct btrfs_root_item *item, struct btrfs_key *key); int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid, struct btrfs_root *latest_root); /* dir-item.c */ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 dir, struct btrfs_key *location, u8 type, u64 index); struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, int name_len, int mod); struct btrfs_dir_item * btrfs_lookup_dir_index_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, u64 objectid, const char *name, int name_len, int mod); struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path, const char *name, int name_len); int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_dir_item *di); int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, u16 name_len, const void *data, u16 data_len, u64 dir); struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, u16 name_len, int mod); /* inode-map.c */ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, struct btrfs_root *fs_root, u64 dirid, u64 *objectid); int btrfs_find_highest_inode(struct btrfs_root *fs_root, u64 *objectid); /* inode-item.c */ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 inode_objectid, u64 ref_objectid, u64 index); int btrfs_del_inode_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 inode_objectid, u64 ref_objectid); int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 objectid); int btrfs_insert_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, struct btrfs_inode_item *inode_item); int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *location, int mod); /* file-item.c */ int btrfs_del_csums(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 len); int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, u64 pos, u64 offset, u64 disk_num_bytes, u64 num_bytes); int btrfs_insert_inline_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, u64 offset, char *buffer, size_t size); int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 objectid, u64 bytenr, int mod); int btrfs_csum_file_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 alloc_end, u64 bytenr, char *data, size_t len); struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, int cow); int btrfs_csum_truncate(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 isize); #endif partclone-0.2.51/src/btrfs/dir-item.c000066400000000000000000000226521200565264100173630ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include "ctree.h" #include "disk-io.h" #include "hash.h" #include "transaction.h" static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *cpu_key, u32 data_size, const char *name, int name_len) { int ret; char *ptr; struct btrfs_item *item; struct extent_buffer *leaf; ret = btrfs_insert_empty_item(trans, root, path, cpu_key, data_size); if (ret == -EEXIST) { struct btrfs_dir_item *di; di = btrfs_match_dir_item_name(root, path, name, name_len); if (di) return ERR_PTR(-EEXIST); ret = btrfs_extend_item(trans, root, path, data_size); WARN_ON(ret > 0); } if (ret < 0) return ERR_PTR(ret); WARN_ON(ret > 0); leaf = path->nodes[0]; item = btrfs_item_nr(leaf, path->slots[0]); ptr = btrfs_item_ptr(leaf, path->slots[0], char); BUG_ON(data_size > btrfs_item_size(leaf, item)); ptr += btrfs_item_size(leaf, item) - data_size; return (struct btrfs_dir_item *)ptr; } int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, u16 name_len, const void *data, u16 data_len, u64 dir) { int ret = 0; struct btrfs_path *path; struct btrfs_dir_item *dir_item; unsigned long name_ptr, data_ptr; struct btrfs_key key, location; struct btrfs_disk_key disk_key; struct extent_buffer *leaf; u32 data_size; key.objectid = dir; btrfs_set_key_type(&key, BTRFS_XATTR_ITEM_KEY); key.offset = btrfs_name_hash(name, name_len); path = btrfs_alloc_path(); if (!path) return -ENOMEM; data_size = sizeof(*dir_item) + name_len + data_len; dir_item = insert_with_overflow(trans, root, path, &key, data_size, name, name_len); /* * FIXME: at some point we should handle xattr's that are larger than * what we can fit in our leaf. We set location to NULL b/c we arent * pointing at anything else, that will change if we store the xattr * data in a separate inode. */ BUG_ON(IS_ERR(dir_item)); memset(&location, 0, sizeof(location)); leaf = path->nodes[0]; btrfs_cpu_key_to_disk(&disk_key, &location); btrfs_set_dir_item_key(leaf, dir_item, &disk_key); btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR); btrfs_set_dir_name_len(leaf, dir_item, name_len); btrfs_set_dir_data_len(leaf, dir_item, data_len); name_ptr = (unsigned long)(dir_item + 1); data_ptr = (unsigned long)((char *)name_ptr + name_len); write_extent_buffer(leaf, name, name_ptr, name_len); write_extent_buffer(leaf, data, data_ptr, data_len); btrfs_mark_buffer_dirty(path->nodes[0]); btrfs_free_path(path); return ret; } int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 dir, struct btrfs_key *location, u8 type, u64 index) { int ret = 0; int ret2 = 0; struct btrfs_path *path; struct btrfs_dir_item *dir_item; struct extent_buffer *leaf; unsigned long name_ptr; struct btrfs_key key; struct btrfs_disk_key disk_key; u32 data_size; key.objectid = dir; btrfs_set_key_type(&key, BTRFS_DIR_ITEM_KEY); key.offset = btrfs_name_hash(name, name_len); path = btrfs_alloc_path(); data_size = sizeof(*dir_item) + name_len; dir_item = insert_with_overflow(trans, root, path, &key, data_size, name, name_len); if (IS_ERR(dir_item)) { ret = PTR_ERR(dir_item); goto out; } leaf = path->nodes[0]; btrfs_cpu_key_to_disk(&disk_key, location); btrfs_set_dir_item_key(leaf, dir_item, &disk_key); btrfs_set_dir_type(leaf, dir_item, type); btrfs_set_dir_data_len(leaf, dir_item, 0); btrfs_set_dir_name_len(leaf, dir_item, name_len); name_ptr = (unsigned long)(dir_item + 1); write_extent_buffer(leaf, name, name_ptr, name_len); btrfs_mark_buffer_dirty(leaf); /* FIXME, use some real flag for selecting the extra index */ if (root == root->fs_info->tree_root) { ret = 0; goto out; } btrfs_release_path(root, path); btrfs_set_key_type(&key, BTRFS_DIR_INDEX_KEY); key.offset = index; dir_item = insert_with_overflow(trans, root, path, &key, data_size, name, name_len); if (IS_ERR(dir_item)) { ret2 = PTR_ERR(dir_item); goto out; } leaf = path->nodes[0]; btrfs_cpu_key_to_disk(&disk_key, location); btrfs_set_dir_item_key(leaf, dir_item, &disk_key); btrfs_set_dir_type(leaf, dir_item, type); btrfs_set_dir_data_len(leaf, dir_item, 0); btrfs_set_dir_name_len(leaf, dir_item, name_len); name_ptr = (unsigned long)(dir_item + 1); write_extent_buffer(leaf, name, name_ptr, name_len); btrfs_mark_buffer_dirty(leaf); out: btrfs_free_path(path); if (ret) return ret; if (ret2) return ret2; return 0; } struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, int name_len, int mod) { int ret; struct btrfs_key key; int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; struct btrfs_key found_key; struct extent_buffer *leaf; key.objectid = dir; btrfs_set_key_type(&key, BTRFS_DIR_ITEM_KEY); key.offset = btrfs_name_hash(name, name_len); ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); if (ret < 0) return ERR_PTR(ret); if (ret > 0) { if (path->slots[0] == 0) return NULL; path->slots[0]--; } leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); if (found_key.objectid != dir || btrfs_key_type(&found_key) != BTRFS_DIR_ITEM_KEY || found_key.offset != key.offset) return NULL; return btrfs_match_dir_item_name(root, path, name, name_len); } struct btrfs_dir_item * btrfs_lookup_dir_index_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, u64 objectid, const char *name, int name_len, int mod) { int ret; struct btrfs_key key; int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; key.objectid = dir; btrfs_set_key_type(&key, BTRFS_DIR_INDEX_KEY); key.offset = objectid; ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); if (ret < 0) return ERR_PTR(ret); if (ret > 0) return ERR_PTR(-ENOENT); return btrfs_match_dir_item_name(root, path, name, name_len); } struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, u16 name_len, int mod) { int ret; struct btrfs_key key; int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; struct btrfs_key found_key; struct extent_buffer *leaf; key.objectid = dir; btrfs_set_key_type(&key, BTRFS_XATTR_ITEM_KEY); key.offset = btrfs_name_hash(name, name_len); ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); if (ret < 0) return ERR_PTR(ret); if (ret > 0) { if (path->slots[0] == 0) return NULL; path->slots[0]--; } leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); if (found_key.objectid != dir || btrfs_key_type(&found_key) != BTRFS_XATTR_ITEM_KEY || found_key.offset != key.offset) return NULL; return btrfs_match_dir_item_name(root, path, name, name_len); } struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path, const char *name, int name_len) { struct btrfs_dir_item *dir_item; unsigned long name_ptr; u32 total_len; u32 cur = 0; u32 this_len; struct extent_buffer *leaf; leaf = path->nodes[0]; dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item); total_len = btrfs_item_size_nr(leaf, path->slots[0]); while(cur < total_len) { this_len = sizeof(*dir_item) + btrfs_dir_name_len(leaf, dir_item) + btrfs_dir_data_len(leaf, dir_item); name_ptr = (unsigned long)(dir_item + 1); if (btrfs_dir_name_len(leaf, dir_item) == name_len && memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0) return dir_item; cur += this_len; dir_item = (struct btrfs_dir_item *)((char *)dir_item + this_len); } return NULL; } int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_dir_item *di) { struct extent_buffer *leaf; u32 sub_item_len; u32 item_len; int ret = 0; leaf = path->nodes[0]; sub_item_len = sizeof(*di) + btrfs_dir_name_len(leaf, di) + btrfs_dir_data_len(leaf, di); item_len = btrfs_item_size_nr(leaf, path->slots[0]); if (sub_item_len == item_len) { ret = btrfs_del_item(trans, root, path); } else { /* MARKER */ unsigned long ptr = (unsigned long)di; unsigned long start; start = btrfs_item_ptr_offset(leaf, path->slots[0]); memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, item_len - (ptr + sub_item_len - start)); ret = btrfs_truncate_item(trans, root, path, item_len - sub_item_len, 1); } return 0; } partclone-0.2.51/src/btrfs/disk-io.c000066400000000000000000000655371200565264100172210ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #define _XOPEN_SOURCE 600 #define __USE_XOPEN2K #define _GNU_SOURCE 1 #include #include #include #include #include #include #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "volumes.h" #include "transaction.h" #include "crc32c.h" #include "utils.h" #include "print-tree.h" static int check_tree_block(struct btrfs_root *root, struct extent_buffer *buf) { struct btrfs_fs_devices *fs_devices; int ret = 1; if (buf->start != btrfs_header_bytenr(buf)) return ret; fs_devices = root->fs_info->fs_devices; while (fs_devices) { if (!memcmp_extent_buffer(buf, fs_devices->fsid, (unsigned long)btrfs_header_fsid(buf), BTRFS_FSID_SIZE)) { ret = 0; break; } fs_devices = fs_devices->seed; } return ret; } u32 btrfs_csum_data(struct btrfs_root *root, char *data, u32 seed, size_t len) { return crc32c(seed, data, len); } void btrfs_csum_final(u32 crc, char *result) { *(__le32 *)result = ~cpu_to_le32(crc); } int csum_tree_block_size(struct extent_buffer *buf, u16 csum_size, int verify) { char *result; u32 len; u32 crc = ~(u32)0; result = malloc(csum_size * sizeof(char)); if (!result) return 1; len = buf->len - BTRFS_CSUM_SIZE; crc = crc32c(crc, buf->data + BTRFS_CSUM_SIZE, len); btrfs_csum_final(crc, result); if (verify) { if (memcmp_extent_buffer(buf, result, 0, csum_size)) { printk("checksum verify failed on %llu wanted %X " "found %X\n", (unsigned long long)buf->start, *((int *)result), *((int *)buf)); free(result); return 1; } } else { write_extent_buffer(buf, result, 0, csum_size); } free(result); return 0; } int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, int verify) { u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); return csum_tree_block_size(buf, csum_size, verify); } struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize) { return find_extent_buffer(&root->fs_info->extent_cache, bytenr, blocksize); } struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize) { return alloc_extent_buffer(&root->fs_info->extent_cache, bytenr, blocksize); } int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, u64 parent_transid) { int ret; int dev_nr; struct extent_buffer *eb; u64 length; struct btrfs_multi_bio *multi = NULL; struct btrfs_device *device; eb = btrfs_find_tree_block(root, bytenr, blocksize); if (eb && btrfs_buffer_uptodate(eb, parent_transid)) { free_extent_buffer(eb); return 0; } dev_nr = 0; length = blocksize; ret = btrfs_map_block(&root->fs_info->mapping_tree, READ, bytenr, &length, &multi, 0); BUG_ON(ret); device = multi->stripes[0].dev; device->total_ios++; blocksize = min(blocksize, (u32)(64 * 1024)); readahead(device->fd, multi->stripes[0].physical, blocksize); kfree(multi); return 0; } static int verify_parent_transid(struct extent_io_tree *io_tree, struct extent_buffer *eb, u64 parent_transid) { int ret; if (!parent_transid || btrfs_header_generation(eb) == parent_transid) return 0; if (extent_buffer_uptodate(eb) && btrfs_header_generation(eb) == parent_transid) { ret = 0; goto out; } printk("parent transid verify failed on %llu wanted %llu found %llu\n", (unsigned long long)eb->start, (unsigned long long)parent_transid, (unsigned long long)btrfs_header_generation(eb)); ret = 1; out: clear_extent_buffer_uptodate(io_tree, eb); return ret; } struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, u64 parent_transid) { int ret; int dev_nr; struct extent_buffer *eb; u64 length; struct btrfs_multi_bio *multi = NULL; struct btrfs_device *device; int mirror_num = 0; int num_copies; eb = btrfs_find_create_tree_block(root, bytenr, blocksize); if (!eb) return NULL; if (btrfs_buffer_uptodate(eb, parent_transid)) return eb; dev_nr = 0; length = blocksize; while (1) { ret = btrfs_map_block(&root->fs_info->mapping_tree, READ, eb->start, &length, &multi, mirror_num); BUG_ON(ret); device = multi->stripes[0].dev; eb->fd = device->fd; device->total_ios++; eb->dev_bytenr = multi->stripes[0].physical; kfree(multi); ret = read_extent_from_disk(eb); if (ret == 0 && check_tree_block(root, eb) == 0 && csum_tree_block(root, eb, 1) == 0 && verify_parent_transid(eb->tree, eb, parent_transid) == 0) { btrfs_set_buffer_uptodate(eb); return eb; } num_copies = btrfs_num_copies(&root->fs_info->mapping_tree, eb->start, eb->len); if (num_copies == 1) { break; } mirror_num++; if (mirror_num > num_copies) { break; } } free_extent_buffer(eb); return NULL; } int write_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *eb) { int ret; int dev_nr; u64 length; struct btrfs_multi_bio *multi = NULL; if (check_tree_block(root, eb)) BUG(); if (!btrfs_buffer_uptodate(eb, trans->transid)) BUG(); btrfs_set_header_flag(eb, BTRFS_HEADER_FLAG_WRITTEN); csum_tree_block(root, eb, 0); dev_nr = 0; length = eb->len; ret = btrfs_map_block(&root->fs_info->mapping_tree, WRITE, eb->start, &length, &multi, 0); while(dev_nr < multi->num_stripes) { BUG_ON(ret); eb->fd = multi->stripes[dev_nr].dev->fd; eb->dev_bytenr = multi->stripes[dev_nr].physical; multi->stripes[dev_nr].dev->total_ios++; dev_nr++; ret = write_extent_to_disk(eb); BUG_ON(ret); } kfree(multi); return 0; } static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, u32 stripesize, struct btrfs_root *root, struct btrfs_fs_info *fs_info, u64 objectid) { root->node = NULL; root->commit_root = NULL; root->sectorsize = sectorsize; root->nodesize = nodesize; root->leafsize = leafsize; root->stripesize = stripesize; root->ref_cows = 0; root->track_dirty = 0; root->fs_info = fs_info; root->objectid = objectid; root->last_trans = 0; root->highest_inode = 0; root->last_inode_alloc = 0; INIT_LIST_HEAD(&root->dirty_list); memset(&root->root_key, 0, sizeof(root->root_key)); memset(&root->root_item, 0, sizeof(root->root_item)); root->root_key.objectid = objectid; return 0; } static int update_cowonly_root(struct btrfs_trans_handle *trans, struct btrfs_root *root) { int ret; u64 old_root_bytenr; struct btrfs_root *tree_root = root->fs_info->tree_root; btrfs_write_dirty_block_groups(trans, root); while(1) { old_root_bytenr = btrfs_root_bytenr(&root->root_item); if (old_root_bytenr == root->node->start) break; btrfs_set_root_bytenr(&root->root_item, root->node->start); btrfs_set_root_generation(&root->root_item, trans->transid); root->root_item.level = btrfs_header_level(root->node); ret = btrfs_update_root(trans, tree_root, &root->root_key, &root->root_item); BUG_ON(ret); btrfs_write_dirty_block_groups(trans, root); } return 0; } static int commit_tree_roots(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info) { struct btrfs_root *root; struct list_head *next; struct extent_buffer *eb; if (fs_info->readonly) return 0; eb = fs_info->tree_root->node; extent_buffer_get(eb); btrfs_cow_block(trans, fs_info->tree_root, eb, NULL, 0, &eb); free_extent_buffer(eb); while(!list_empty(&fs_info->dirty_cowonly_roots)) { next = fs_info->dirty_cowonly_roots.next; list_del_init(next); root = list_entry(next, struct btrfs_root, dirty_list); update_cowonly_root(trans, root); } return 0; } static int __commit_transaction(struct btrfs_trans_handle *trans, struct btrfs_root *root) { u64 start; u64 end; struct extent_buffer *eb; struct extent_io_tree *tree = &root->fs_info->extent_cache; int ret; while(1) { ret = find_first_extent_bit(tree, 0, &start, &end, EXTENT_DIRTY); if (ret) break; while(start <= end) { eb = find_first_extent_buffer(tree, start); BUG_ON(!eb || eb->start != start); ret = write_tree_block(trans, root, eb); BUG_ON(ret); start += eb->len; clear_extent_buffer_dirty(eb); free_extent_buffer(eb); } } return 0; } int btrfs_commit_transaction(struct btrfs_trans_handle *trans, struct btrfs_root *root) { int ret = 0; struct btrfs_fs_info *fs_info = root->fs_info; if (root->commit_root == root->node) goto commit_tree; free_extent_buffer(root->commit_root); root->commit_root = NULL; btrfs_set_root_bytenr(&root->root_item, root->node->start); btrfs_set_root_generation(&root->root_item, trans->transid); root->root_item.level = btrfs_header_level(root->node); ret = btrfs_update_root(trans, root->fs_info->tree_root, &root->root_key, &root->root_item); BUG_ON(ret); commit_tree: ret = commit_tree_roots(trans, fs_info); BUG_ON(ret); ret = __commit_transaction(trans, root); BUG_ON(ret); write_ctree_super(trans, root); btrfs_finish_extent_commit(trans, fs_info->extent_root, &fs_info->pinned_extents); btrfs_free_transaction(root, trans); free_extent_buffer(root->commit_root); root->commit_root = NULL; fs_info->running_transaction = NULL; return 0; } static int find_and_setup_root(struct btrfs_root *tree_root, struct btrfs_fs_info *fs_info, u64 objectid, struct btrfs_root *root) { int ret; u32 blocksize; u64 generation; __setup_root(tree_root->nodesize, tree_root->leafsize, tree_root->sectorsize, tree_root->stripesize, root, fs_info, objectid); ret = btrfs_find_last_root(tree_root, objectid, &root->root_item, &root->root_key); BUG_ON(ret); blocksize = btrfs_level_size(root, btrfs_root_level(&root->root_item)); generation = btrfs_root_generation(&root->root_item); root->node = read_tree_block(root, btrfs_root_bytenr(&root->root_item), blocksize, generation); BUG_ON(!root->node); return 0; } static int find_and_setup_log_root(struct btrfs_root *tree_root, struct btrfs_fs_info *fs_info, struct btrfs_super_block *disk_super) { u32 blocksize; u64 blocknr = btrfs_super_log_root(disk_super); struct btrfs_root *log_root = malloc(sizeof(struct btrfs_root)); if (blocknr == 0) return 0; blocksize = btrfs_level_size(tree_root, btrfs_super_log_root_level(disk_super)); __setup_root(tree_root->nodesize, tree_root->leafsize, tree_root->sectorsize, tree_root->stripesize, log_root, fs_info, BTRFS_TREE_LOG_OBJECTID); log_root->node = read_tree_block(tree_root, blocknr, blocksize, btrfs_super_generation(disk_super) + 1); fs_info->log_root_tree = log_root; BUG_ON(!log_root->node); return 0; } int btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root) { if (root->node) free_extent_buffer(root->node); if (root->commit_root) free_extent_buffer(root->commit_root); kfree(root); return 0; } static int free_fs_roots(struct btrfs_fs_info *fs_info) { struct cache_extent *cache; struct btrfs_root *root; while (1) { cache = find_first_cache_extent(&fs_info->fs_root_cache, 0); if (!cache) break; root = container_of(cache, struct btrfs_root, cache); remove_cache_extent(&fs_info->fs_root_cache, cache); btrfs_free_fs_root(fs_info, root); } return 0; } struct btrfs_root *btrfs_read_fs_root_no_cache(struct btrfs_fs_info *fs_info, struct btrfs_key *location) { struct btrfs_root *root; struct btrfs_root *tree_root = fs_info->tree_root; struct btrfs_path *path; struct extent_buffer *l; u64 generation; u32 blocksize; int ret = 0; root = malloc(sizeof(*root)); if (!root) return ERR_PTR(-ENOMEM); memset(root, 0, sizeof(*root)); if (location->offset == (u64)-1) { ret = find_and_setup_root(tree_root, fs_info, location->objectid, root); if (ret) { free(root); return ERR_PTR(ret); } goto insert; } __setup_root(tree_root->nodesize, tree_root->leafsize, tree_root->sectorsize, tree_root->stripesize, root, fs_info, location->objectid); path = btrfs_alloc_path(); BUG_ON(!path); ret = btrfs_search_slot(NULL, tree_root, location, path, 0, 0); if (ret != 0) { if (ret > 0) ret = -ENOENT; goto out; } l = path->nodes[0]; read_extent_buffer(l, &root->root_item, btrfs_item_ptr_offset(l, path->slots[0]), sizeof(root->root_item)); memcpy(&root->root_key, location, sizeof(*location)); ret = 0; out: btrfs_release_path(root, path); btrfs_free_path(path); if (ret) { free(root); return ERR_PTR(ret); } generation = btrfs_root_generation(&root->root_item); blocksize = btrfs_level_size(root, btrfs_root_level(&root->root_item)); root->node = read_tree_block(root, btrfs_root_bytenr(&root->root_item), blocksize, generation); BUG_ON(!root->node); insert: root->ref_cows = 1; return root; } struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_key *location) { struct btrfs_root *root; struct cache_extent *cache; int ret; if (location->objectid == BTRFS_ROOT_TREE_OBJECTID) return fs_info->tree_root; if (location->objectid == BTRFS_EXTENT_TREE_OBJECTID) return fs_info->extent_root; if (location->objectid == BTRFS_CHUNK_TREE_OBJECTID) return fs_info->chunk_root; if (location->objectid == BTRFS_DEV_TREE_OBJECTID) return fs_info->dev_root; if (location->objectid == BTRFS_CSUM_TREE_OBJECTID) return fs_info->csum_root; BUG_ON(location->objectid == BTRFS_TREE_RELOC_OBJECTID || location->offset != (u64)-1); cache = find_cache_extent(&fs_info->fs_root_cache, location->objectid, 1); if (cache) return container_of(cache, struct btrfs_root, cache); root = btrfs_read_fs_root_no_cache(fs_info, location); if (IS_ERR(root)) return root; root->cache.start = location->objectid; root->cache.size = 1; ret = insert_existing_cache_extent(&fs_info->fs_root_cache, &root->cache); BUG_ON(ret); return root; } struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes) { int fp; struct btrfs_root *root; int flags = O_CREAT | O_RDWR; if (!writes) flags = O_RDONLY; fp = open(filename, flags, 0600); if (fp < 0) { fprintf (stderr, "Could not open %s\n", filename); return NULL; } root = open_ctree_fd(fp, filename, sb_bytenr, writes); close(fp); return root; } struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, int writes) { u32 sectorsize; u32 nodesize; u32 leafsize; u32 blocksize; u32 stripesize; u64 generation; struct btrfs_key key; struct btrfs_root *tree_root = malloc(sizeof(struct btrfs_root)); struct btrfs_root *extent_root = malloc(sizeof(struct btrfs_root)); struct btrfs_root *chunk_root = malloc(sizeof(struct btrfs_root)); struct btrfs_root *dev_root = malloc(sizeof(struct btrfs_root)); struct btrfs_root *csum_root = malloc(sizeof(struct btrfs_root)); struct btrfs_fs_info *fs_info = malloc(sizeof(*fs_info)); int ret; struct btrfs_super_block *disk_super; struct btrfs_fs_devices *fs_devices = NULL; u64 total_devs; u64 features; if (sb_bytenr == 0) sb_bytenr = BTRFS_SUPER_INFO_OFFSET; ret = btrfs_scan_one_device(fp, path, &fs_devices, &total_devs, sb_bytenr); if (ret) { fprintf(stderr, "No valid Btrfs found on %s\n", path); return NULL; } if (total_devs != 1) { ret = btrfs_scan_for_fsid(fs_devices, total_devs, 1); BUG_ON(ret); } memset(fs_info, 0, sizeof(*fs_info)); fs_info->tree_root = tree_root; fs_info->extent_root = extent_root; fs_info->chunk_root = chunk_root; fs_info->dev_root = dev_root; fs_info->csum_root = csum_root; if (!writes) fs_info->readonly = 1; extent_io_tree_init(&fs_info->extent_cache); extent_io_tree_init(&fs_info->free_space_cache); extent_io_tree_init(&fs_info->block_group_cache); extent_io_tree_init(&fs_info->pinned_extents); extent_io_tree_init(&fs_info->pending_del); extent_io_tree_init(&fs_info->extent_ins); cache_tree_init(&fs_info->fs_root_cache); cache_tree_init(&fs_info->mapping_tree.cache_tree); mutex_init(&fs_info->fs_mutex); fs_info->fs_devices = fs_devices; INIT_LIST_HEAD(&fs_info->dirty_cowonly_roots); INIT_LIST_HEAD(&fs_info->space_info); __setup_root(4096, 4096, 4096, 4096, tree_root, fs_info, BTRFS_ROOT_TREE_OBJECTID); if (writes) ret = btrfs_open_devices(fs_devices, O_RDWR); else ret = btrfs_open_devices(fs_devices, O_RDONLY); BUG_ON(ret); fs_info->super_bytenr = sb_bytenr; disk_super = &fs_info->super_copy; ret = btrfs_read_dev_super(fs_devices->latest_bdev, disk_super, sb_bytenr); if (ret) { printk("No valid btrfs found\n"); BUG_ON(1); } memcpy(fs_info->fsid, &disk_super->fsid, BTRFS_FSID_SIZE); features = btrfs_super_incompat_flags(disk_super) & ~BTRFS_FEATURE_INCOMPAT_SUPP; if (features) { printk("couldn't open because of unsupported " "option features (%Lx).\n", features); BUG_ON(1); } features = btrfs_super_incompat_flags(disk_super); if (!(features & BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF)) { features |= BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF; btrfs_set_super_incompat_flags(disk_super, features); } features = btrfs_super_compat_ro_flags(disk_super) & ~BTRFS_FEATURE_COMPAT_RO_SUPP; if (writes && features) { printk("couldn't open RDWR because of unsupported " "option features (%Lx).\n", features); BUG_ON(1); } nodesize = btrfs_super_nodesize(disk_super); leafsize = btrfs_super_leafsize(disk_super); sectorsize = btrfs_super_sectorsize(disk_super); stripesize = btrfs_super_stripesize(disk_super); tree_root->nodesize = nodesize; tree_root->leafsize = leafsize; tree_root->sectorsize = sectorsize; tree_root->stripesize = stripesize; ret = btrfs_read_sys_array(tree_root); BUG_ON(ret); blocksize = btrfs_level_size(tree_root, btrfs_super_chunk_root_level(disk_super)); generation = btrfs_super_chunk_root_generation(disk_super); __setup_root(nodesize, leafsize, sectorsize, stripesize, chunk_root, fs_info, BTRFS_CHUNK_TREE_OBJECTID); chunk_root->node = read_tree_block(chunk_root, btrfs_super_chunk_root(disk_super), blocksize, generation); BUG_ON(!chunk_root->node); read_extent_buffer(chunk_root->node, fs_info->chunk_tree_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(chunk_root->node), BTRFS_UUID_SIZE); if (!(btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_METADUMP)) { ret = btrfs_read_chunk_tree(chunk_root); BUG_ON(ret); } blocksize = btrfs_level_size(tree_root, btrfs_super_root_level(disk_super)); generation = btrfs_super_generation(disk_super); tree_root->node = read_tree_block(tree_root, btrfs_super_root(disk_super), blocksize, generation); BUG_ON(!tree_root->node); ret = find_and_setup_root(tree_root, fs_info, BTRFS_EXTENT_TREE_OBJECTID, extent_root); BUG_ON(ret); extent_root->track_dirty = 1; ret = find_and_setup_root(tree_root, fs_info, BTRFS_DEV_TREE_OBJECTID, dev_root); BUG_ON(ret); dev_root->track_dirty = 1; ret = find_and_setup_root(tree_root, fs_info, BTRFS_CSUM_TREE_OBJECTID, csum_root); BUG_ON(ret); csum_root->track_dirty = 1; BUG_ON(ret); find_and_setup_log_root(tree_root, fs_info, disk_super); fs_info->generation = generation + 1; btrfs_read_block_groups(fs_info->tree_root); key.objectid = BTRFS_FS_TREE_OBJECTID; key.type = BTRFS_ROOT_ITEM_KEY; key.offset = (u64)-1; fs_info->fs_root = btrfs_read_fs_root(fs_info, &key); fs_info->data_alloc_profile = (u64)-1; fs_info->metadata_alloc_profile = (u64)-1; fs_info->system_alloc_profile = fs_info->metadata_alloc_profile; return fs_info->fs_root; } int btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 sb_bytenr) { u8 fsid[BTRFS_FSID_SIZE]; struct btrfs_super_block buf; int i; int ret; u64 transid = 0; u64 bytenr; if (sb_bytenr != BTRFS_SUPER_INFO_OFFSET) { ret = pread64(fd, &buf, sizeof(buf), sb_bytenr); if (ret < sizeof(buf)) return -1; if (btrfs_super_bytenr(&buf) != sb_bytenr || strncmp((char *)(&buf.magic), BTRFS_MAGIC, sizeof(buf.magic))) return -1; memcpy(sb, &buf, sizeof(*sb)); return 0; } for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) { bytenr = btrfs_sb_offset(i); ret = pread64(fd, &buf, sizeof(buf), bytenr); if (ret < sizeof(buf)) break; if (btrfs_super_bytenr(&buf) != bytenr || strncmp((char *)(&buf.magic), BTRFS_MAGIC, sizeof(buf.magic))) continue; if (i == 0) memcpy(fsid, buf.fsid, sizeof(fsid)); else if (memcmp(fsid, buf.fsid, sizeof(fsid))) continue; if (btrfs_super_generation(&buf) > transid) { memcpy(sb, &buf, sizeof(*sb)); transid = btrfs_super_generation(&buf); } } return transid > 0 ? 0 : -1; } int write_dev_supers(struct btrfs_root *root, struct btrfs_super_block *sb, struct btrfs_device *device) { u64 bytenr; u32 crc; int i, ret; if (root->fs_info->super_bytenr != BTRFS_SUPER_INFO_OFFSET) { btrfs_set_super_bytenr(sb, root->fs_info->super_bytenr); crc = ~(u32)0; crc = btrfs_csum_data(NULL, (char *)sb + BTRFS_CSUM_SIZE, crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE); btrfs_csum_final(crc, (char *)&sb->csum[0]); ret = pwrite64(device->fd, sb, BTRFS_SUPER_INFO_SIZE, root->fs_info->super_bytenr); BUG_ON(ret != BTRFS_SUPER_INFO_SIZE); return 0; } for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) { bytenr = btrfs_sb_offset(i); if (bytenr + BTRFS_SUPER_INFO_SIZE >= device->total_bytes) break; btrfs_set_super_bytenr(sb, bytenr); crc = ~(u32)0; crc = btrfs_csum_data(NULL, (char *)sb + BTRFS_CSUM_SIZE, crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE); btrfs_csum_final(crc, (char *)&sb->csum[0]); ret = pwrite64(device->fd, sb, BTRFS_SUPER_INFO_SIZE, bytenr); BUG_ON(ret != BTRFS_SUPER_INFO_SIZE); } return 0; } int write_all_supers(struct btrfs_root *root) { struct list_head *cur; struct list_head *head = &root->fs_info->fs_devices->devices; struct btrfs_device *dev; struct btrfs_super_block *sb; struct btrfs_dev_item *dev_item; int ret; u64 flags; sb = &root->fs_info->super_copy; dev_item = &sb->dev_item; list_for_each(cur, head) { dev = list_entry(cur, struct btrfs_device, dev_list); if (!dev->writeable) continue; btrfs_set_stack_device_generation(dev_item, 0); btrfs_set_stack_device_type(dev_item, dev->type); btrfs_set_stack_device_id(dev_item, dev->devid); btrfs_set_stack_device_total_bytes(dev_item, dev->total_bytes); btrfs_set_stack_device_bytes_used(dev_item, dev->bytes_used); btrfs_set_stack_device_io_align(dev_item, dev->io_align); btrfs_set_stack_device_io_width(dev_item, dev->io_width); btrfs_set_stack_device_sector_size(dev_item, dev->sector_size); memcpy(dev_item->uuid, dev->uuid, BTRFS_UUID_SIZE); memcpy(dev_item->fsid, dev->fs_devices->fsid, BTRFS_UUID_SIZE); flags = btrfs_super_flags(sb); btrfs_set_super_flags(sb, flags | BTRFS_HEADER_FLAG_WRITTEN); ret = write_dev_supers(root, sb, dev); BUG_ON(ret); } return 0; } int write_ctree_super(struct btrfs_trans_handle *trans, struct btrfs_root *root) { int ret; struct btrfs_root *tree_root = root->fs_info->tree_root; struct btrfs_root *chunk_root = root->fs_info->chunk_root; if (root->fs_info->readonly) return 0; btrfs_set_super_generation(&root->fs_info->super_copy, trans->transid); btrfs_set_super_root(&root->fs_info->super_copy, tree_root->node->start); btrfs_set_super_root_level(&root->fs_info->super_copy, btrfs_header_level(tree_root->node)); btrfs_set_super_chunk_root(&root->fs_info->super_copy, chunk_root->node->start); btrfs_set_super_chunk_root_level(&root->fs_info->super_copy, btrfs_header_level(chunk_root->node)); btrfs_set_super_chunk_root_generation(&root->fs_info->super_copy, btrfs_header_generation(chunk_root->node)); ret = write_all_supers(root); if (ret) fprintf(stderr, "failed to write new super block err %d\n", ret); return ret; } static int close_all_devices(struct btrfs_fs_info *fs_info) { struct list_head *list; struct list_head *next; struct btrfs_device *device; return 0; list = &fs_info->fs_devices->devices; list_for_each(next, list) { device = list_entry(next, struct btrfs_device, dev_list); close(device->fd); } return 0; } int close_ctree(struct btrfs_root *root) { int ret; struct btrfs_trans_handle *trans; struct btrfs_fs_info *fs_info = root->fs_info; trans = btrfs_start_transaction(root, 1); btrfs_commit_transaction(trans, root); trans = btrfs_start_transaction(root, 1); ret = commit_tree_roots(trans, fs_info); BUG_ON(ret); ret = __commit_transaction(trans, root); BUG_ON(ret); write_ctree_super(trans, root); btrfs_free_transaction(root, trans); btrfs_free_block_groups(fs_info); free_fs_roots(fs_info); if (fs_info->extent_root->node) free_extent_buffer(fs_info->extent_root->node); if (fs_info->tree_root->node) free_extent_buffer(fs_info->tree_root->node); if (fs_info->chunk_root->node) free_extent_buffer(fs_info->chunk_root->node); if (fs_info->dev_root->node) free_extent_buffer(fs_info->dev_root->node); if (fs_info->csum_root->node) free_extent_buffer(fs_info->csum_root->node); if (root->fs_info->log_root_tree) { if (root->fs_info->log_root_tree->node) free_extent_buffer(root->fs_info->log_root_tree->node); free(root->fs_info->log_root_tree); } close_all_devices(root->fs_info); extent_io_tree_cleanup(&fs_info->extent_cache); extent_io_tree_cleanup(&fs_info->free_space_cache); extent_io_tree_cleanup(&fs_info->block_group_cache); extent_io_tree_cleanup(&fs_info->pinned_extents); extent_io_tree_cleanup(&fs_info->pending_del); extent_io_tree_cleanup(&fs_info->extent_ins); free(fs_info->tree_root); free(fs_info->extent_root); free(fs_info->chunk_root); free(fs_info->dev_root); free(fs_info->csum_root); free(fs_info); return 0; } int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *eb) { return clear_extent_buffer_dirty(eb); } int wait_on_tree_block_writeback(struct btrfs_root *root, struct extent_buffer *eb) { return 0; } void btrfs_mark_buffer_dirty(struct extent_buffer *eb) { set_extent_buffer_dirty(eb); } int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid) { int ret; ret = extent_buffer_uptodate(buf); if (!ret) return ret; ret = verify_parent_transid(buf->tree, buf, parent_transid); return !ret; } int btrfs_set_buffer_uptodate(struct extent_buffer *eb) { return set_extent_buffer_uptodate(eb); } partclone-0.2.51/src/btrfs/disk-io.h000066400000000000000000000062671200565264100172210ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __DISKIO__ #define __DISKIO__ #define BTRFS_SUPER_INFO_OFFSET (64 * 1024) #define BTRFS_SUPER_INFO_SIZE 4096 #define BTRFS_SUPER_MIRROR_MAX 3 #define BTRFS_SUPER_MIRROR_SHIFT 12 static inline u64 btrfs_sb_offset(int mirror) { u64 start = 16 * 1024; if (mirror) return start << (BTRFS_SUPER_MIRROR_SHIFT * mirror); return BTRFS_SUPER_INFO_OFFSET; } struct btrfs_device; struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, u64 parent_transid); int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, u64 parent_transid); struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize); int clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf); struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes); struct btrfs_root *open_ctree_fd(int fp, const char *path, u64 sb_bytenr, int writes); int close_ctree(struct btrfs_root *root); int write_ctree_super(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 sb_bytenr); int btrfs_map_bh_to_logical(struct btrfs_root *root, struct extent_buffer *bh, u64 logical); struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize); struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_key *location); struct btrfs_root *btrfs_read_fs_root_no_cache(struct btrfs_fs_info *fs_info, struct btrfs_key *location); int btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root); void btrfs_mark_buffer_dirty(struct extent_buffer *buf); int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid); int btrfs_set_buffer_uptodate(struct extent_buffer *buf); int wait_on_tree_block_writeback(struct btrfs_root *root, struct extent_buffer *buf); u32 btrfs_csum_data(struct btrfs_root *root, char *data, u32 seed, size_t len); void btrfs_csum_final(u32 crc, char *result); int btrfs_commit_transaction(struct btrfs_trans_handle *trans, struct btrfs_root *root); int btrfs_open_device(struct btrfs_device *dev); int csum_tree_block_size(struct extent_buffer *buf, u16 csum_sectorsize, int verify); int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, int verify); int btrfs_read_buffer(struct extent_buffer *buf, u64 parent_transid); #endif partclone-0.2.51/src/btrfs/extent-cache.c000066400000000000000000000100251200565264100202100ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include #include #include "kerncompat.h" #include "extent-cache.h" void cache_tree_init(struct cache_tree *tree) { tree->root.rb_node = NULL; } static struct rb_node *tree_insert(struct rb_root *root, u64 offset, u64 size, struct rb_node *node) { struct rb_node ** p = &root->rb_node; struct rb_node * parent = NULL; struct cache_extent *entry; while(*p) { parent = *p; entry = rb_entry(parent, struct cache_extent, rb_node); if (offset + size <= entry->start) p = &(*p)->rb_left; else if (offset >= entry->start + entry->size) p = &(*p)->rb_right; else return parent; } entry = rb_entry(parent, struct cache_extent, rb_node); rb_link_node(node, parent, p); rb_insert_color(node, root); return NULL; } static struct rb_node *__tree_search(struct rb_root *root, u64 offset, u64 size, struct rb_node **prev_ret) { struct rb_node * n = root->rb_node; struct rb_node *prev = NULL; struct cache_extent *entry; struct cache_extent *prev_entry = NULL; while(n) { entry = rb_entry(n, struct cache_extent, rb_node); prev = n; prev_entry = entry; if (offset + size <= entry->start) n = n->rb_left; else if (offset >= entry->start + entry->size) n = n->rb_right; else return n; } if (!prev_ret) return NULL; while(prev && offset >= prev_entry->start + prev_entry->size) { prev = rb_next(prev); prev_entry = rb_entry(prev, struct cache_extent, rb_node); } *prev_ret = prev; return NULL; } struct cache_extent *alloc_cache_extent(u64 start, u64 size) { struct cache_extent *pe = malloc(sizeof(*pe)); if (!pe) return pe; pe->start = start; pe->size = size; return pe; } int insert_existing_cache_extent(struct cache_tree *tree, struct cache_extent *pe) { struct rb_node *found; struct cache_extent *entry; found = tree_insert(&tree->root, pe->start, pe->size, &pe->rb_node); if (found) { entry = rb_entry(found, struct cache_extent, rb_node); return -EEXIST; } return 0; } int insert_cache_extent(struct cache_tree *tree, u64 start, u64 size) { struct cache_extent *pe = alloc_cache_extent(start, size); int ret; ret = insert_existing_cache_extent(tree, pe); if (ret) free(pe); return ret; } struct cache_extent *find_cache_extent(struct cache_tree *tree, u64 start, u64 size) { struct rb_node *prev; struct rb_node *ret; struct cache_extent *entry; ret = __tree_search(&tree->root, start, size, &prev); if (!ret) return NULL; entry = rb_entry(ret, struct cache_extent, rb_node); return entry; } struct cache_extent *find_first_cache_extent(struct cache_tree *tree, u64 start) { struct rb_node *prev; struct rb_node *ret; struct cache_extent *entry; ret = __tree_search(&tree->root, start, 1, &prev); if (!ret) ret = prev; if (!ret) return NULL; entry = rb_entry(ret, struct cache_extent, rb_node); return entry; } struct cache_extent *prev_cache_extent(struct cache_extent *pe) { struct rb_node *node = rb_prev(&pe->rb_node); if (!node) return NULL; return rb_entry(node, struct cache_extent, rb_node); } struct cache_extent *next_cache_extent(struct cache_extent *pe) { struct rb_node *node = rb_next(&pe->rb_node); if (!node) return NULL; return rb_entry(node, struct cache_extent, rb_node); } void remove_cache_extent(struct cache_tree *tree, struct cache_extent *pe) { rb_erase(&pe->rb_node, &tree->root); } partclone-0.2.51/src/btrfs/extent-cache.h000066400000000000000000000033651200565264100202260ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __PENDING_EXTENT__ #define __PENDING_EXTENT__ #include "kerncompat.h" #include "rbtree.h" struct cache_tree { struct rb_root root; }; struct cache_extent { struct rb_node rb_node; u64 start; u64 size; }; void cache_tree_init(struct cache_tree *tree); void remove_cache_extent(struct cache_tree *tree, struct cache_extent *pe); struct cache_extent *find_first_cache_extent(struct cache_tree *tree, u64 start); struct cache_extent *prev_cache_extent(struct cache_extent *pe); struct cache_extent *next_cache_extent(struct cache_extent *pe); struct cache_extent *find_cache_extent(struct cache_tree *tree, u64 start, u64 size); int insert_cache_extent(struct cache_tree *tree, u64 start, u64 size); int insert_existing_cache_extent(struct cache_tree *tree, struct cache_extent *pe); static inline int cache_tree_empty(struct cache_tree *tree) { return RB_EMPTY_ROOT(&tree->root); } static inline void free_cache_extent(struct cache_extent *pe) { free(pe); } struct cache_extent *alloc_pending_extent(u64 start, u64 size); #endif partclone-0.2.51/src/btrfs/extent-tree.c000066400000000000000000002534031200565264100201150ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include #include #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" #include "transaction.h" #include "crc32c.h" #include "volumes.h" #define BLOCK_GROUP_DATA EXTENT_WRITEBACK #define BLOCK_GROUP_METADATA EXTENT_UPTODATE #define BLOCK_GROUP_SYSTEM EXTENT_NEW #define BLOCK_GROUP_DIRTY EXTENT_DIRTY #define PENDING_EXTENT_INSERT 0 #define PENDING_EXTENT_DELETE 1 #define PENDING_BACKREF_UPDATE 2 struct pending_extent_op { int type; u64 bytenr; u64 num_bytes; u64 flags; struct btrfs_disk_key key; int level; }; static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 root_objectid, u64 generation, u64 flags, struct btrfs_disk_key *key, int level, struct btrfs_key *ins); static int __free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner_objectid, u64 owner_offset, int refs_to_drop); static int finish_current_insert(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root); static int del_pending_extents(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root); static int remove_sb_from_cache(struct btrfs_root *root, struct btrfs_block_group_cache *cache) { u64 bytenr; u64 *logical; int stripe_len; int i, nr, ret; struct extent_io_tree *free_space_cache; free_space_cache = &root->fs_info->free_space_cache; for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) { bytenr = btrfs_sb_offset(i); ret = btrfs_rmap_block(&root->fs_info->mapping_tree, cache->key.objectid, bytenr, 0, &logical, &nr, &stripe_len); BUG_ON(ret); while (nr--) { clear_extent_dirty(free_space_cache, logical[nr], logical[nr] + stripe_len - 1, GFP_NOFS); } kfree(logical); } return 0; } static int cache_block_group(struct btrfs_root *root, struct btrfs_block_group_cache *block_group) { struct btrfs_path *path; int ret; struct btrfs_key key; struct extent_buffer *leaf; struct extent_io_tree *free_space_cache; int slot; u64 last; u64 hole_size; if (!block_group) return 0; root = root->fs_info->extent_root; free_space_cache = &root->fs_info->free_space_cache; if (block_group->cached) return 0; path = btrfs_alloc_path(); if (!path) return -ENOMEM; path->reada = 2; last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); key.objectid = last; key.offset = 0; btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (ret < 0) goto err; while(1) { leaf = path->nodes[0]; slot = path->slots[0]; if (slot >= btrfs_header_nritems(leaf)) { ret = btrfs_next_leaf(root, path); if (ret < 0) goto err; if (ret == 0) { continue; } else { break; } } btrfs_item_key_to_cpu(leaf, &key, slot); if (key.objectid < block_group->key.objectid) { goto next; } if (key.objectid >= block_group->key.objectid + block_group->key.offset) { break; } if (btrfs_key_type(&key) == BTRFS_EXTENT_ITEM_KEY) { if (key.objectid > last) { hole_size = key.objectid - last; set_extent_dirty(free_space_cache, last, last + hole_size - 1, GFP_NOFS); } last = key.objectid + key.offset; } next: path->slots[0]++; } if (block_group->key.objectid + block_group->key.offset > last) { hole_size = block_group->key.objectid + block_group->key.offset - last; set_extent_dirty(free_space_cache, last, last + hole_size - 1, GFP_NOFS); } remove_sb_from_cache(root, block_group); block_group->cached = 1; err: btrfs_free_path(path); return 0; } struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct btrfs_fs_info *info, u64 bytenr) { struct extent_io_tree *block_group_cache; struct btrfs_block_group_cache *block_group = NULL; u64 ptr; u64 start; u64 end; int ret; bytenr = max_t(u64, bytenr, BTRFS_SUPER_INFO_OFFSET + BTRFS_SUPER_INFO_SIZE); block_group_cache = &info->block_group_cache; ret = find_first_extent_bit(block_group_cache, bytenr, &start, &end, BLOCK_GROUP_DATA | BLOCK_GROUP_METADATA | BLOCK_GROUP_SYSTEM); if (ret) { return NULL; } ret = get_state_private(block_group_cache, start, &ptr); if (ret) return NULL; block_group = (struct btrfs_block_group_cache *)(unsigned long)ptr; return block_group; } struct btrfs_block_group_cache *btrfs_lookup_block_group(struct btrfs_fs_info *info, u64 bytenr) { struct extent_io_tree *block_group_cache; struct btrfs_block_group_cache *block_group = NULL; u64 ptr; u64 start; u64 end; int ret; block_group_cache = &info->block_group_cache; ret = find_first_extent_bit(block_group_cache, bytenr, &start, &end, BLOCK_GROUP_DATA | BLOCK_GROUP_METADATA | BLOCK_GROUP_SYSTEM); if (ret) { return NULL; } ret = get_state_private(block_group_cache, start, &ptr); if (ret) return NULL; block_group = (struct btrfs_block_group_cache *)(unsigned long)ptr; if (block_group->key.objectid <= bytenr && bytenr < block_group->key.objectid + block_group->key.offset) return block_group; return NULL; } static int block_group_bits(struct btrfs_block_group_cache *cache, u64 bits) { return (cache->flags & bits) == bits; } static int noinline find_search_start(struct btrfs_root *root, struct btrfs_block_group_cache **cache_ret, u64 *start_ret, int num, int data) { int ret; struct btrfs_block_group_cache *cache = *cache_ret; u64 last; u64 start = 0; u64 end = 0; u64 search_start = *start_ret; int wrapped = 0; if (!cache) { goto out; } again: ret = cache_block_group(root, cache); if (ret) goto out; last = max(search_start, cache->key.objectid); if (cache->ro || !block_group_bits(cache, data)) { goto new_group; } while(1) { ret = find_first_extent_bit(&root->fs_info->free_space_cache, last, &start, &end, EXTENT_DIRTY); if (ret) { goto new_group; } start = max(last, start); last = end + 1; if (last - start < num) { continue; } if (start + num > cache->key.objectid + cache->key.offset) { goto new_group; } *start_ret = start; return 0; } out: cache = btrfs_lookup_block_group(root->fs_info, search_start); if (!cache) { printk("Unable to find block group for %llu\n", (unsigned long long)search_start); WARN_ON(1); } return -ENOSPC; new_group: last = cache->key.objectid + cache->key.offset; wrapped: cache = btrfs_lookup_first_block_group(root->fs_info, last); if (!cache) { no_cache: if (!wrapped) { wrapped = 1; last = search_start; goto wrapped; } goto out; } cache = btrfs_find_block_group(root, cache, last, data, 0); cache = btrfs_find_block_group(root, cache, last, data, 0); if (!cache) goto no_cache; *cache_ret = cache; goto again; } static u64 div_factor(u64 num, int factor) { if (factor == 10) return num; num *= factor; num /= 10; return num; } static int block_group_state_bits(u64 flags) { int bits = 0; if (flags & BTRFS_BLOCK_GROUP_DATA) bits |= BLOCK_GROUP_DATA; if (flags & BTRFS_BLOCK_GROUP_METADATA) bits |= BLOCK_GROUP_METADATA; if (flags & BTRFS_BLOCK_GROUP_SYSTEM) bits |= BLOCK_GROUP_SYSTEM; return bits; } struct btrfs_block_group_cache *btrfs_find_block_group(struct btrfs_root *root, struct btrfs_block_group_cache *hint, u64 search_start, int data, int owner) { struct btrfs_block_group_cache *cache; struct extent_io_tree *block_group_cache; struct btrfs_block_group_cache *found_group = NULL; struct btrfs_fs_info *info = root->fs_info; u64 used; u64 last = 0; u64 hint_last; u64 start; u64 end; u64 free_check; u64 ptr; int bit; int ret; int full_search = 0; int factor = 10; block_group_cache = &info->block_group_cache; if (!owner) factor = 10; bit = block_group_state_bits(data); if (search_start) { struct btrfs_block_group_cache *shint; shint = btrfs_lookup_block_group(info, search_start); if (shint && !shint->ro && block_group_bits(shint, data)) { used = btrfs_block_group_used(&shint->item); if (used + shint->pinned < div_factor(shint->key.offset, factor)) { return shint; } } } if (hint && !hint->ro && block_group_bits(hint, data)) { used = btrfs_block_group_used(&hint->item); if (used + hint->pinned < div_factor(hint->key.offset, factor)) { return hint; } last = hint->key.objectid + hint->key.offset; hint_last = last; } else { if (hint) hint_last = max(hint->key.objectid, search_start); else hint_last = search_start; last = hint_last; } again: while(1) { ret = find_first_extent_bit(block_group_cache, last, &start, &end, bit); if (ret) break; ret = get_state_private(block_group_cache, start, &ptr); if (ret) break; cache = (struct btrfs_block_group_cache *)(unsigned long)ptr; last = cache->key.objectid + cache->key.offset; used = btrfs_block_group_used(&cache->item); if (!cache->ro && block_group_bits(cache, data)) { if (full_search) free_check = cache->key.offset; else free_check = div_factor(cache->key.offset, factor); if (used + cache->pinned < free_check) { found_group = cache; goto found; } } cond_resched(); } if (!full_search) { last = search_start; full_search = 1; goto again; } found: return found_group; } /* * Back reference rules. Back refs have three main goals: * * 1) differentiate between all holders of references to an extent so that * when a reference is dropped we can make sure it was a valid reference * before freeing the extent. * * 2) Provide enough information to quickly find the holders of an extent * if we notice a given block is corrupted or bad. * * 3) Make it easy to migrate blocks for FS shrinking or storage pool * maintenance. This is actually the same as #2, but with a slightly * different use case. * * There are two kinds of back refs. The implicit back refs is optimized * for pointers in non-shared tree blocks. For a given pointer in a block, * back refs of this kind provide information about the block's owner tree * and the pointer's key. These information allow us to find the block by * b-tree searching. The full back refs is for pointers in tree blocks not * referenced by their owner trees. The location of tree block is recorded * in the back refs. Actually the full back refs is generic, and can be * used in all cases the implicit back refs is used. The major shortcoming * of the full back refs is its overhead. Every time a tree block gets * COWed, we have to update back refs entry for all pointers in it. * * For a newly allocated tree block, we use implicit back refs for * pointers in it. This means most tree related operations only involve * implicit back refs. For a tree block created in old transaction, the * only way to drop a reference to it is COW it. So we can detect the * event that tree block loses its owner tree's reference and do the * back refs conversion. * * When a tree block is COW'd through a tree, there are four cases: * * The reference count of the block is one and the tree is the block's * owner tree. Nothing to do in this case. * * The reference count of the block is one and the tree is not the * block's owner tree. In this case, full back refs is used for pointers * in the block. Remove these full back refs, add implicit back refs for * every pointers in the new block. * * The reference count of the block is greater than one and the tree is * the block's owner tree. In this case, implicit back refs is used for * pointers in the block. Add full back refs for every pointers in the * block, increase lower level extents' reference counts. The original * implicit back refs are entailed to the new block. * * The reference count of the block is greater than one and the tree is * not the block's owner tree. Add implicit back refs for every pointer in * the new block, increase lower level extents' reference count. * * Back Reference Key composing: * * The key objectid corresponds to the first byte in the extent, * The key type is used to differentiate between types of back refs. * There are different meanings of the key offset for different types * of back refs. * * File extents can be referenced by: * * - multiple snapshots, subvolumes, or different generations in one subvol * - different files inside a single subvolume * - different offsets inside a file (bookend extents in file.c) * * The extent ref structure for the implicit back refs has fields for: * * - Objectid of the subvolume root * - objectid of the file holding the reference * - original offset in the file * - how many bookend extents * * The key offset for the implicit back refs is hash of the first * three fields. * * The extent ref structure for the full back refs has field for: * * - number of pointers in the tree leaf * * The key offset for the implicit back refs is the first byte of * the tree leaf * * When a file extent is allocated, The implicit back refs is used. * the fields are filled in: * * (root_key.objectid, inode objectid, offset in file, 1) * * When a file extent is removed file truncation, we find the * corresponding implicit back refs and check the following fields: * * (btrfs_header_owner(leaf), inode objectid, offset in file) * * Btree extents can be referenced by: * * - Different subvolumes * * Both the implicit back refs and the full back refs for tree blocks * only consist of key. The key offset for the implicit back refs is * objectid of block's owner tree. The key offset for the full back refs * is the first byte of parent block. * * When implicit back refs is used, information about the lowest key and * level of the tree block are required. These information are stored in * tree block info structure. */ #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 static int convert_extent_item_v0(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 owner, u32 extra_size) { struct btrfs_extent_item *item; struct btrfs_extent_item_v0 *ei0; struct btrfs_extent_ref_v0 *ref0; struct btrfs_tree_block_info *bi; struct extent_buffer *leaf; struct btrfs_key key; struct btrfs_key found_key; u32 new_size = sizeof(*item); u64 refs; int ret; leaf = path->nodes[0]; BUG_ON(btrfs_item_size_nr(leaf, path->slots[0]) != sizeof(*ei0)); btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); ei0 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item_v0); refs = btrfs_extent_refs_v0(leaf, ei0); if (owner == (u64)-1) { while (1) { if (path->slots[0] >= btrfs_header_nritems(leaf)) { ret = btrfs_next_leaf(root, path); if (ret < 0) return ret; BUG_ON(ret > 0); leaf = path->nodes[0]; } btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); BUG_ON(key.objectid != found_key.objectid); if (found_key.type != BTRFS_EXTENT_REF_V0_KEY) { path->slots[0]++; continue; } ref0 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref_v0); owner = btrfs_ref_objectid_v0(leaf, ref0); break; } } btrfs_release_path(root, path); if (owner < BTRFS_FIRST_FREE_OBJECTID) new_size += sizeof(*bi); new_size -= sizeof(*ei0); ret = btrfs_search_slot(trans, root, &key, path, new_size, 1); if (ret < 0) return ret; BUG_ON(ret); ret = btrfs_extend_item(trans, root, path, new_size); BUG_ON(ret); leaf = path->nodes[0]; item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); btrfs_set_extent_refs(leaf, item, refs); /* FIXME: get real generation */ btrfs_set_extent_generation(leaf, item, 0); if (owner < BTRFS_FIRST_FREE_OBJECTID) { btrfs_set_extent_flags(leaf, item, BTRFS_EXTENT_FLAG_TREE_BLOCK | BTRFS_BLOCK_FLAG_FULL_BACKREF); bi = (struct btrfs_tree_block_info *)(item + 1); /* FIXME: get first key of the block */ memset_extent_buffer(leaf, 0, (unsigned long)bi, sizeof(*bi)); btrfs_set_tree_block_level(leaf, bi, (int)owner); } else { btrfs_set_extent_flags(leaf, item, BTRFS_EXTENT_FLAG_DATA); } btrfs_mark_buffer_dirty(leaf); return 0; } #endif static u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset) { u32 high_crc = ~(u32)0; u32 low_crc = ~(u32)0; __le64 lenum; lenum = cpu_to_le64(root_objectid); high_crc = btrfs_crc32c(high_crc, &lenum, sizeof(lenum)); lenum = cpu_to_le64(owner); low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum)); lenum = cpu_to_le64(offset); low_crc = btrfs_crc32c(low_crc, &lenum, sizeof(lenum)); return ((u64)high_crc << 31) ^ (u64)low_crc; } static u64 hash_extent_data_ref_item(struct extent_buffer *leaf, struct btrfs_extent_data_ref *ref) { return hash_extent_data_ref(btrfs_extent_data_ref_root(leaf, ref), btrfs_extent_data_ref_objectid(leaf, ref), btrfs_extent_data_ref_offset(leaf, ref)); } static int match_extent_data_ref(struct extent_buffer *leaf, struct btrfs_extent_data_ref *ref, u64 root_objectid, u64 owner, u64 offset) { if (btrfs_extent_data_ref_root(leaf, ref) != root_objectid || btrfs_extent_data_ref_objectid(leaf, ref) != owner || btrfs_extent_data_ref_offset(leaf, ref) != offset) return 0; return 1; } static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 parent, u64 root_objectid, u64 owner, u64 offset) { struct btrfs_key key; struct btrfs_extent_data_ref *ref; struct extent_buffer *leaf; u32 nritems; int ret; int recow; int err = -ENOENT; key.objectid = bytenr; if (parent) { key.type = BTRFS_SHARED_DATA_REF_KEY; key.offset = parent; } else { key.type = BTRFS_EXTENT_DATA_REF_KEY; key.offset = hash_extent_data_ref(root_objectid, owner, offset); } again: recow = 0; ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret < 0) { err = ret; goto fail; } if (parent) { if (!ret) return 0; #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 key.type = BTRFS_EXTENT_REF_V0_KEY; btrfs_release_path(root, path); ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret < 0) { err = ret; goto fail; } if (!ret) return 0; #endif goto fail; } leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); while (1) { if (path->slots[0] >= nritems) { ret = btrfs_next_leaf(root, path); if (ret < 0) err = ret; if (ret) goto fail; leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); recow = 1; } btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (key.objectid != bytenr || key.type != BTRFS_EXTENT_DATA_REF_KEY) goto fail; ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_data_ref); if (match_extent_data_ref(leaf, ref, root_objectid, owner, offset)) { if (recow) { btrfs_release_path(root, path); goto again; } err = 0; break; } path->slots[0]++; } fail: return err; } static noinline int insert_extent_data_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 parent, u64 root_objectid, u64 owner, u64 offset, int refs_to_add) { struct btrfs_key key; struct extent_buffer *leaf; u32 size; u32 num_refs; int ret; key.objectid = bytenr; if (parent) { key.type = BTRFS_SHARED_DATA_REF_KEY; key.offset = parent; size = sizeof(struct btrfs_shared_data_ref); } else { key.type = BTRFS_EXTENT_DATA_REF_KEY; key.offset = hash_extent_data_ref(root_objectid, owner, offset); size = sizeof(struct btrfs_extent_data_ref); } ret = btrfs_insert_empty_item(trans, root, path, &key, size); if (ret && ret != -EEXIST) goto fail; leaf = path->nodes[0]; if (parent) { struct btrfs_shared_data_ref *ref; ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_shared_data_ref); if (ret == 0) { btrfs_set_shared_data_ref_count(leaf, ref, refs_to_add); } else { num_refs = btrfs_shared_data_ref_count(leaf, ref); num_refs += refs_to_add; btrfs_set_shared_data_ref_count(leaf, ref, num_refs); } } else { struct btrfs_extent_data_ref *ref; while (ret == -EEXIST) { ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_data_ref); if (match_extent_data_ref(leaf, ref, root_objectid, owner, offset)) break; btrfs_release_path(root, path); key.offset++; ret = btrfs_insert_empty_item(trans, root, path, &key, size); if (ret && ret != -EEXIST) goto fail; leaf = path->nodes[0]; } ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_data_ref); if (ret == 0) { btrfs_set_extent_data_ref_root(leaf, ref, root_objectid); btrfs_set_extent_data_ref_objectid(leaf, ref, owner); btrfs_set_extent_data_ref_offset(leaf, ref, offset); btrfs_set_extent_data_ref_count(leaf, ref, refs_to_add); } else { num_refs = btrfs_extent_data_ref_count(leaf, ref); num_refs += refs_to_add; btrfs_set_extent_data_ref_count(leaf, ref, num_refs); } } btrfs_mark_buffer_dirty(leaf); ret = 0; fail: btrfs_release_path(root, path); return ret; } static noinline int remove_extent_data_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int refs_to_drop) { struct btrfs_key key; struct btrfs_extent_data_ref *ref1 = NULL; struct btrfs_shared_data_ref *ref2 = NULL; struct extent_buffer *leaf; u32 num_refs = 0; int ret = 0; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (key.type == BTRFS_EXTENT_DATA_REF_KEY) { ref1 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_data_ref); num_refs = btrfs_extent_data_ref_count(leaf, ref1); } else if (key.type == BTRFS_SHARED_DATA_REF_KEY) { ref2 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_shared_data_ref); num_refs = btrfs_shared_data_ref_count(leaf, ref2); #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 } else if (key.type == BTRFS_EXTENT_REF_V0_KEY) { struct btrfs_extent_ref_v0 *ref0; ref0 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref_v0); num_refs = btrfs_ref_count_v0(leaf, ref0); #endif } else { BUG(); } BUG_ON(num_refs < refs_to_drop); num_refs -= refs_to_drop; if (num_refs == 0) { ret = btrfs_del_item(trans, root, path); } else { if (key.type == BTRFS_EXTENT_DATA_REF_KEY) btrfs_set_extent_data_ref_count(leaf, ref1, num_refs); else if (key.type == BTRFS_SHARED_DATA_REF_KEY) btrfs_set_shared_data_ref_count(leaf, ref2, num_refs); #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 else { struct btrfs_extent_ref_v0 *ref0; ref0 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref_v0); btrfs_set_ref_count_v0(leaf, ref0, num_refs); } #endif btrfs_mark_buffer_dirty(leaf); } return ret; } static noinline u32 extent_data_ref_count(struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref *iref) { struct btrfs_key key; struct extent_buffer *leaf; struct btrfs_extent_data_ref *ref1; struct btrfs_shared_data_ref *ref2; u32 num_refs = 0; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (iref) { if (btrfs_extent_inline_ref_type(leaf, iref) == BTRFS_EXTENT_DATA_REF_KEY) { ref1 = (struct btrfs_extent_data_ref *)(&iref->offset); num_refs = btrfs_extent_data_ref_count(leaf, ref1); } else { ref2 = (struct btrfs_shared_data_ref *)(iref + 1); num_refs = btrfs_shared_data_ref_count(leaf, ref2); } } else if (key.type == BTRFS_EXTENT_DATA_REF_KEY) { ref1 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_data_ref); num_refs = btrfs_extent_data_ref_count(leaf, ref1); } else if (key.type == BTRFS_SHARED_DATA_REF_KEY) { ref2 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_shared_data_ref); num_refs = btrfs_shared_data_ref_count(leaf, ref2); #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 } else if (key.type == BTRFS_EXTENT_REF_V0_KEY) { struct btrfs_extent_ref_v0 *ref0; ref0 = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_ref_v0); num_refs = btrfs_ref_count_v0(leaf, ref0); #endif } else { BUG(); } return num_refs; } static noinline int lookup_tree_block_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 parent, u64 root_objectid) { struct btrfs_key key; int ret; key.objectid = bytenr; if (parent) { key.type = BTRFS_SHARED_BLOCK_REF_KEY; key.offset = parent; } else { key.type = BTRFS_TREE_BLOCK_REF_KEY; key.offset = root_objectid; } ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret > 0) ret = -ENOENT; #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 if (ret == -ENOENT && parent) { btrfs_release_path(root, path); key.type = BTRFS_EXTENT_REF_V0_KEY; ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret > 0) ret = -ENOENT; } #endif return ret; } static noinline int insert_tree_block_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 parent, u64 root_objectid) { struct btrfs_key key; int ret; key.objectid = bytenr; if (parent) { key.type = BTRFS_SHARED_BLOCK_REF_KEY; key.offset = parent; } else { key.type = BTRFS_TREE_BLOCK_REF_KEY; key.offset = root_objectid; } ret = btrfs_insert_empty_item(trans, root, path, &key, 0); btrfs_release_path(root, path); return ret; } static inline int extent_ref_type(u64 parent, u64 owner) { if (owner < BTRFS_FIRST_FREE_OBJECTID) { if (parent > 0) return BTRFS_SHARED_BLOCK_REF_KEY; else return BTRFS_TREE_BLOCK_REF_KEY; } else { if (parent > 0) return BTRFS_SHARED_DATA_REF_KEY; else return BTRFS_EXTENT_DATA_REF_KEY; } } static int find_next_key(struct btrfs_path *path, struct btrfs_key *key) { int level; for (level = 0; level < BTRFS_MAX_LEVEL; level++) { if (!path->nodes[level]) break; if (path->slots[level] + 1 >= btrfs_header_nritems(path->nodes[level])) continue; if (level == 0) btrfs_item_key_to_cpu(path->nodes[level], key, path->slots[level] + 1); else btrfs_node_key_to_cpu(path->nodes[level], key, path->slots[level] + 1); return 0; } return 1; } static int lookup_inline_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref **ref_ret, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner, u64 offset, int insert) { struct btrfs_key key; struct extent_buffer *leaf; struct btrfs_extent_item *ei; struct btrfs_extent_inline_ref *iref; u64 flags; u32 item_size; unsigned long ptr; unsigned long end; int extra_size; int type; int want; int ret; int err = 0; key.objectid = bytenr; key.type = BTRFS_EXTENT_ITEM_KEY; key.offset = num_bytes; want = extent_ref_type(parent, owner); if (insert) extra_size = btrfs_extent_inline_ref_size(want); else extra_size = -1; ret = btrfs_search_slot(trans, root, &key, path, extra_size, 1); if (ret < 0) { err = ret; goto out; } BUG_ON(ret); leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, path->slots[0]); #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 if (item_size < sizeof(*ei)) { if (!insert) { err = -ENOENT; goto out; } ret = convert_extent_item_v0(trans, root, path, owner, extra_size); if (ret < 0) { err = ret; goto out; } leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, path->slots[0]); } #endif BUG_ON(item_size < sizeof(*ei)); ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); flags = btrfs_extent_flags(leaf, ei); ptr = (unsigned long)(ei + 1); end = (unsigned long)ei + item_size; if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) { ptr += sizeof(struct btrfs_tree_block_info); BUG_ON(ptr > end); } else { BUG_ON(!(flags & BTRFS_EXTENT_FLAG_DATA)); } err = -ENOENT; while (1) { if (ptr >= end) { WARN_ON(ptr > end); break; } iref = (struct btrfs_extent_inline_ref *)ptr; type = btrfs_extent_inline_ref_type(leaf, iref); if (want < type) break; if (want > type) { ptr += btrfs_extent_inline_ref_size(type); continue; } if (type == BTRFS_EXTENT_DATA_REF_KEY) { struct btrfs_extent_data_ref *dref; dref = (struct btrfs_extent_data_ref *)(&iref->offset); if (match_extent_data_ref(leaf, dref, root_objectid, owner, offset)) { err = 0; break; } if (hash_extent_data_ref_item(leaf, dref) < hash_extent_data_ref(root_objectid, owner, offset)) break; } else { u64 ref_offset; ref_offset = btrfs_extent_inline_ref_offset(leaf, iref); if (parent > 0) { if (parent == ref_offset) { err = 0; break; } if (ref_offset < parent) break; } else { if (root_objectid == ref_offset) { err = 0; break; } if (ref_offset < root_objectid) break; } } ptr += btrfs_extent_inline_ref_size(type); } if (err == -ENOENT && insert) { if (item_size + extra_size >= BTRFS_MAX_EXTENT_ITEM_SIZE(root)) { err = -EAGAIN; goto out; } /* * To add new inline back ref, we have to make sure * there is no corresponding back ref item. * For simplicity, we just do not add new inline back * ref if there is any back ref item. */ if (find_next_key(path, &key) == 0 && key.objectid == bytenr && key.type < BTRFS_BLOCK_GROUP_ITEM_KEY) { err = -EAGAIN; goto out; } } *ref_ret = (struct btrfs_extent_inline_ref *)ptr; out: return err; } static int setup_inline_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref *iref, u64 parent, u64 root_objectid, u64 owner, u64 offset, int refs_to_add) { struct extent_buffer *leaf; struct btrfs_extent_item *ei; unsigned long ptr; unsigned long end; unsigned long item_offset; u64 refs; int size; int type; int ret; leaf = path->nodes[0]; ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); item_offset = (unsigned long)iref - (unsigned long)ei; type = extent_ref_type(parent, owner); size = btrfs_extent_inline_ref_size(type); ret = btrfs_extend_item(trans, root, path, size); BUG_ON(ret); ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); refs = btrfs_extent_refs(leaf, ei); refs += refs_to_add; btrfs_set_extent_refs(leaf, ei, refs); ptr = (unsigned long)ei + item_offset; end = (unsigned long)ei + btrfs_item_size_nr(leaf, path->slots[0]); if (ptr < end - size) memmove_extent_buffer(leaf, ptr + size, ptr, end - size - ptr); iref = (struct btrfs_extent_inline_ref *)ptr; btrfs_set_extent_inline_ref_type(leaf, iref, type); if (type == BTRFS_EXTENT_DATA_REF_KEY) { struct btrfs_extent_data_ref *dref; dref = (struct btrfs_extent_data_ref *)(&iref->offset); btrfs_set_extent_data_ref_root(leaf, dref, root_objectid); btrfs_set_extent_data_ref_objectid(leaf, dref, owner); btrfs_set_extent_data_ref_offset(leaf, dref, offset); btrfs_set_extent_data_ref_count(leaf, dref, refs_to_add); } else if (type == BTRFS_SHARED_DATA_REF_KEY) { struct btrfs_shared_data_ref *sref; sref = (struct btrfs_shared_data_ref *)(iref + 1); btrfs_set_shared_data_ref_count(leaf, sref, refs_to_add); btrfs_set_extent_inline_ref_offset(leaf, iref, parent); } else if (type == BTRFS_SHARED_BLOCK_REF_KEY) { btrfs_set_extent_inline_ref_offset(leaf, iref, parent); } else { btrfs_set_extent_inline_ref_offset(leaf, iref, root_objectid); } btrfs_mark_buffer_dirty(leaf); return 0; } static int lookup_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref **ref_ret, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner, u64 offset) { int ret; ret = lookup_inline_extent_backref(trans, root, path, ref_ret, bytenr, num_bytes, parent, root_objectid, owner, offset, 0); if (ret != -ENOENT) return ret; btrfs_release_path(root, path); *ref_ret = NULL; if (owner < BTRFS_FIRST_FREE_OBJECTID) { ret = lookup_tree_block_ref(trans, root, path, bytenr, parent, root_objectid); } else { ret = lookup_extent_data_ref(trans, root, path, bytenr, parent, root_objectid, owner, offset); } return ret; } static int update_inline_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref *iref, int refs_to_mod) { struct extent_buffer *leaf; struct btrfs_extent_item *ei; struct btrfs_extent_data_ref *dref = NULL; struct btrfs_shared_data_ref *sref = NULL; unsigned long ptr; unsigned long end; u32 item_size; int size; int type; int ret; u64 refs; leaf = path->nodes[0]; ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); refs = btrfs_extent_refs(leaf, ei); WARN_ON(refs_to_mod < 0 && refs + refs_to_mod <= 0); refs += refs_to_mod; btrfs_set_extent_refs(leaf, ei, refs); type = btrfs_extent_inline_ref_type(leaf, iref); if (type == BTRFS_EXTENT_DATA_REF_KEY) { dref = (struct btrfs_extent_data_ref *)(&iref->offset); refs = btrfs_extent_data_ref_count(leaf, dref); } else if (type == BTRFS_SHARED_DATA_REF_KEY) { sref = (struct btrfs_shared_data_ref *)(iref + 1); refs = btrfs_shared_data_ref_count(leaf, sref); } else { refs = 1; BUG_ON(refs_to_mod != -1); } BUG_ON(refs_to_mod < 0 && refs < -refs_to_mod); refs += refs_to_mod; if (refs > 0) { if (type == BTRFS_EXTENT_DATA_REF_KEY) btrfs_set_extent_data_ref_count(leaf, dref, refs); else btrfs_set_shared_data_ref_count(leaf, sref, refs); } else { size = btrfs_extent_inline_ref_size(type); item_size = btrfs_item_size_nr(leaf, path->slots[0]); ptr = (unsigned long)iref; end = (unsigned long)ei + item_size; if (ptr + size < end) memmove_extent_buffer(leaf, ptr, ptr + size, end - ptr - size); item_size -= size; ret = btrfs_truncate_item(trans, root, path, item_size, 1); BUG_ON(ret); } btrfs_mark_buffer_dirty(leaf); return 0; } static int insert_inline_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner, u64 offset, int refs_to_add) { struct btrfs_extent_inline_ref *iref; int ret; ret = lookup_inline_extent_backref(trans, root, path, &iref, bytenr, num_bytes, parent, root_objectid, owner, offset, 1); if (ret == 0) { BUG_ON(owner < BTRFS_FIRST_FREE_OBJECTID); ret = update_inline_extent_backref(trans, root, path, iref, refs_to_add); } else if (ret == -ENOENT) { ret = setup_inline_extent_backref(trans, root, path, iref, parent, root_objectid, owner, offset, refs_to_add); } return ret; } static int insert_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, u64 parent, u64 root_objectid, u64 owner, u64 offset, int refs_to_add) { int ret; if (owner >= BTRFS_FIRST_FREE_OBJECTID) { ret = insert_extent_data_ref(trans, root, path, bytenr, parent, root_objectid, owner, offset, refs_to_add); } else { BUG_ON(refs_to_add != 1); ret = insert_tree_block_ref(trans, root, path, bytenr, parent, root_objectid); } return ret; } static int remove_extent_backref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_extent_inline_ref *iref, int refs_to_drop, int is_data) { int ret; BUG_ON(!is_data && refs_to_drop != 1); if (iref) { ret = update_inline_extent_backref(trans, root, path, iref, -refs_to_drop); } else if (is_data) { ret = remove_extent_data_ref(trans, root, path, refs_to_drop); } else { ret = btrfs_del_item(trans, root, path); } return ret; } int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner, u64 offset) { struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_extent_item *item; u64 refs; int ret; int err = 0; path = btrfs_alloc_path(); if (!path) return -ENOMEM; path->reada = 1; path->leave_spinning = 1; ret = insert_inline_extent_backref(trans, root->fs_info->extent_root, path, bytenr, num_bytes, parent, root_objectid, owner, offset, 1); if (ret == 0) goto out; if (ret != -EAGAIN) { err = ret; goto out; } leaf = path->nodes[0]; item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); refs = btrfs_extent_refs(leaf, item); btrfs_set_extent_refs(leaf, item, refs + 1); btrfs_mark_buffer_dirty(leaf); btrfs_release_path(root->fs_info->extent_root, path); path->reada = 1; path->leave_spinning = 1; /* now insert the actual backref */ ret = insert_extent_backref(trans, root->fs_info->extent_root, path, bytenr, parent, root_objectid, owner, offset, 1); if (ret) err = ret; out: btrfs_free_path(path); finish_current_insert(trans, root->fs_info->extent_root); del_pending_extents(trans, root->fs_info->extent_root); BUG_ON(err); return err; } int btrfs_extent_post_op(struct btrfs_trans_handle *trans, struct btrfs_root *root) { finish_current_insert(trans, root->fs_info->extent_root); del_pending_extents(trans, root->fs_info->extent_root); return 0; } int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 *refs, u64 *flags) { struct btrfs_path *path; int ret; struct btrfs_key key; struct extent_buffer *l; struct btrfs_extent_item *item; u32 item_size; u64 num_refs; u64 extent_flags; WARN_ON(num_bytes < root->sectorsize); path = btrfs_alloc_path(); path->reada = 1; key.objectid = bytenr; key.offset = num_bytes; btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); ret = btrfs_search_slot(trans, root->fs_info->extent_root, &key, path, 0, 0); if (ret < 0) goto out; if (ret != 0) { btrfs_print_leaf(root, path->nodes[0]); printk("failed to find block number %Lu\n", bytenr); BUG(); } l = path->nodes[0]; item_size = btrfs_item_size_nr(l, path->slots[0]); if (item_size >= sizeof(*item)) { item = btrfs_item_ptr(l, path->slots[0], struct btrfs_extent_item); num_refs = btrfs_extent_refs(l, item); extent_flags = btrfs_extent_flags(l, item); } else { #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 struct btrfs_extent_item_v0 *ei0; BUG_ON(item_size != sizeof(*ei0)); ei0 = btrfs_item_ptr(l, path->slots[0], struct btrfs_extent_item_v0); num_refs = btrfs_extent_refs_v0(l, ei0); /* FIXME: this isn't correct for data */ extent_flags = BTRFS_BLOCK_FLAG_FULL_BACKREF; #else BUG(); #endif } BUG_ON(num_refs == 0); item = btrfs_item_ptr(l, path->slots[0], struct btrfs_extent_item); if (refs) *refs = num_refs; if (flags) *flags = extent_flags; out: btrfs_free_path(path); return 0; } int btrfs_set_block_flags(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 flags) { struct btrfs_path *path; int ret; struct btrfs_key key; struct extent_buffer *l; struct btrfs_extent_item *item; u32 item_size; WARN_ON(num_bytes < root->sectorsize); path = btrfs_alloc_path(); path->reada = 1; key.objectid = bytenr; key.offset = num_bytes; btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); ret = btrfs_search_slot(trans, root->fs_info->extent_root, &key, path, 0, 0); if (ret < 0) goto out; if (ret != 0) { btrfs_print_leaf(root, path->nodes[0]); printk("failed to find block number %Lu\n", (unsigned long long)bytenr); BUG(); } l = path->nodes[0]; item_size = btrfs_item_size_nr(l, path->slots[0]); #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 if (item_size < sizeof(*item)) { ret = convert_extent_item_v0(trans, root->fs_info->extent_root, path, (u64)-1, 0); if (ret < 0) goto out; l = path->nodes[0]; item_size = btrfs_item_size_nr(l, path->slots[0]); } #endif BUG_ON(item_size < sizeof(*item)); item = btrfs_item_ptr(l, path->slots[0], struct btrfs_extent_item); flags |= btrfs_extent_flags(l, item); btrfs_set_extent_flags(l, item, flags); out: btrfs_free_path(path); finish_current_insert(trans, root->fs_info->extent_root); del_pending_extents(trans, root->fs_info->extent_root); return ret; } static int __btrfs_mod_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, int record_parent, int inc) { u64 bytenr; u64 num_bytes; u64 parent; u64 ref_root; u32 nritems; struct btrfs_key key; struct btrfs_file_extent_item *fi; int i; int level; int ret = 0; int faili = 0; int (*process_func)(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64, u64, u64, u64, u64, u64); ref_root = btrfs_header_owner(buf); nritems = btrfs_header_nritems(buf); level = btrfs_header_level(buf); if (!root->ref_cows && level == 0) return 0; if (inc) process_func = btrfs_inc_extent_ref; else process_func = btrfs_free_extent; if (record_parent) parent = buf->start; else parent = 0; for (i = 0; i < nritems; i++) { cond_resched(); if (level == 0) { btrfs_item_key_to_cpu(buf, &key, i); if (btrfs_key_type(&key) != BTRFS_EXTENT_DATA_KEY) continue; fi = btrfs_item_ptr(buf, i, struct btrfs_file_extent_item); if (btrfs_file_extent_type(buf, fi) == BTRFS_FILE_EXTENT_INLINE) continue; bytenr = btrfs_file_extent_disk_bytenr(buf, fi); if (bytenr == 0) continue; num_bytes = btrfs_file_extent_disk_num_bytes(buf, fi); key.offset -= btrfs_file_extent_offset(buf, fi); ret = process_func(trans, root, bytenr, num_bytes, parent, ref_root, key.objectid, key.offset); if (ret) { faili = i; WARN_ON(1); goto fail; } } else { bytenr = btrfs_node_blockptr(buf, i); num_bytes = btrfs_level_size(root, level - 1); ret = process_func(trans, root, bytenr, num_bytes, parent, ref_root, level - 1, 0); if (ret) { faili = i; WARN_ON(1); goto fail; } } } return 0; fail: WARN_ON(1); #if 0 for (i =0; i < faili; i++) { if (level == 0) { u64 disk_bytenr; btrfs_item_key_to_cpu(buf, &key, i); if (btrfs_key_type(&key) != BTRFS_EXTENT_DATA_KEY) continue; fi = btrfs_item_ptr(buf, i, struct btrfs_file_extent_item); if (btrfs_file_extent_type(buf, fi) == BTRFS_FILE_EXTENT_INLINE) continue; disk_bytenr = btrfs_file_extent_disk_bytenr(buf, fi); if (disk_bytenr == 0) continue; err = btrfs_free_extent(trans, root, disk_bytenr, btrfs_file_extent_disk_num_bytes(buf, fi), 0); BUG_ON(err); } else { bytenr = btrfs_node_blockptr(buf, i); err = btrfs_free_extent(trans, root, bytenr, btrfs_level_size(root, level - 1), 0); BUG_ON(err); } } #endif return ret; } int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, int record_parent) { return __btrfs_mod_ref(trans, root, buf, record_parent, 1); } int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, int record_parent) { return __btrfs_mod_ref(trans, root, buf, record_parent, 0); } static int write_one_cache_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_block_group_cache *cache) { int ret; int pending_ret; struct btrfs_root *extent_root = root->fs_info->extent_root; unsigned long bi; struct extent_buffer *leaf; ret = btrfs_search_slot(trans, extent_root, &cache->key, path, 0, 1); if (ret < 0) goto fail; BUG_ON(ret); leaf = path->nodes[0]; bi = btrfs_item_ptr_offset(leaf, path->slots[0]); write_extent_buffer(leaf, &cache->item, bi, sizeof(cache->item)); btrfs_mark_buffer_dirty(leaf); btrfs_release_path(extent_root, path); fail: finish_current_insert(trans, extent_root); pending_ret = del_pending_extents(trans, extent_root); if (ret) return ret; if (pending_ret) return pending_ret; return 0; } int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, struct btrfs_root *root) { struct extent_io_tree *block_group_cache; struct btrfs_block_group_cache *cache; int ret; struct btrfs_path *path; u64 last = 0; u64 start; u64 end; u64 ptr; block_group_cache = &root->fs_info->block_group_cache; path = btrfs_alloc_path(); if (!path) return -ENOMEM; while(1) { ret = find_first_extent_bit(block_group_cache, last, &start, &end, BLOCK_GROUP_DIRTY); if (ret) { if (last == 0) break; last = 0; continue; } last = end + 1; ret = get_state_private(block_group_cache, start, &ptr); BUG_ON(ret); clear_extent_bits(block_group_cache, start, end, BLOCK_GROUP_DIRTY, GFP_NOFS); cache = (struct btrfs_block_group_cache *)(unsigned long)ptr; ret = write_one_cache_group(trans, root, path, cache); BUG_ON(ret); } btrfs_free_path(path); return 0; } static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info, u64 flags) { struct list_head *head = &info->space_info; struct list_head *cur; struct btrfs_space_info *found; list_for_each(cur, head) { found = list_entry(cur, struct btrfs_space_info, list); if (found->flags == flags) return found; } return NULL; } static int update_space_info(struct btrfs_fs_info *info, u64 flags, u64 total_bytes, u64 bytes_used, struct btrfs_space_info **space_info) { struct btrfs_space_info *found; found = __find_space_info(info, flags); if (found) { found->total_bytes += total_bytes; found->bytes_used += bytes_used; WARN_ON(found->total_bytes < found->bytes_used); *space_info = found; return 0; } found = kmalloc(sizeof(*found), GFP_NOFS); if (!found) return -ENOMEM; list_add(&found->list, &info->space_info); found->flags = flags; found->total_bytes = total_bytes; found->bytes_used = bytes_used; found->bytes_pinned = 0; found->full = 0; *space_info = found; return 0; } static void set_avail_alloc_bits(struct btrfs_fs_info *fs_info, u64 flags) { u64 extra_flags = flags & (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP); if (extra_flags) { if (flags & BTRFS_BLOCK_GROUP_DATA) fs_info->avail_data_alloc_bits |= extra_flags; if (flags & BTRFS_BLOCK_GROUP_METADATA) fs_info->avail_metadata_alloc_bits |= extra_flags; if (flags & BTRFS_BLOCK_GROUP_SYSTEM) fs_info->avail_system_alloc_bits |= extra_flags; } } static int do_chunk_alloc(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 alloc_bytes, u64 flags) { struct btrfs_space_info *space_info; u64 thresh; u64 start; u64 num_bytes; int ret; space_info = __find_space_info(extent_root->fs_info, flags); if (!space_info) { ret = update_space_info(extent_root->fs_info, flags, 0, 0, &space_info); BUG_ON(ret); } BUG_ON(!space_info); if (space_info->full) return 0; thresh = div_factor(space_info->total_bytes, 7); if ((space_info->bytes_used + space_info->bytes_pinned + alloc_bytes) < thresh) return 0; ret = btrfs_alloc_chunk(trans, extent_root, &start, &num_bytes, flags); if (ret == -ENOSPC) { space_info->full = 1; return 0; } BUG_ON(ret); ret = btrfs_make_block_group(trans, extent_root, 0, flags, BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, num_bytes); BUG_ON(ret); return 0; } static int update_block_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, int alloc, int mark_free) { struct btrfs_block_group_cache *cache; struct btrfs_fs_info *info = root->fs_info; u64 total = num_bytes; u64 old_val; u64 byte_in_group; u64 start; u64 end; /* block accounting for super block */ old_val = btrfs_super_bytes_used(&info->super_copy); if (alloc) old_val += num_bytes; else old_val -= num_bytes; btrfs_set_super_bytes_used(&info->super_copy, old_val); /* block accounting for root item */ old_val = btrfs_root_used(&root->root_item); if (alloc) old_val += num_bytes; else old_val -= num_bytes; btrfs_set_root_used(&root->root_item, old_val); while(total) { cache = btrfs_lookup_block_group(info, bytenr); if (!cache) { return -1; } byte_in_group = bytenr - cache->key.objectid; WARN_ON(byte_in_group > cache->key.offset); start = cache->key.objectid; end = start + cache->key.offset - 1; set_extent_bits(&info->block_group_cache, start, end, BLOCK_GROUP_DIRTY, GFP_NOFS); old_val = btrfs_block_group_used(&cache->item); num_bytes = min(total, cache->key.offset - byte_in_group); if (alloc) { old_val += num_bytes; cache->space_info->bytes_used += num_bytes; } else { old_val -= num_bytes; cache->space_info->bytes_used -= num_bytes; if (mark_free) { set_extent_dirty(&info->free_space_cache, bytenr, bytenr + num_bytes - 1, GFP_NOFS); } } btrfs_set_block_group_used(&cache->item, old_val); total -= num_bytes; bytenr += num_bytes; } return 0; } static int update_pinned_extents(struct btrfs_root *root, u64 bytenr, u64 num, int pin) { u64 len; struct btrfs_block_group_cache *cache; struct btrfs_fs_info *fs_info = root->fs_info; if (pin) { set_extent_dirty(&fs_info->pinned_extents, bytenr, bytenr + num - 1, GFP_NOFS); } else { clear_extent_dirty(&fs_info->pinned_extents, bytenr, bytenr + num - 1, GFP_NOFS); } while (num > 0) { cache = btrfs_lookup_block_group(fs_info, bytenr); WARN_ON(!cache); len = min(num, cache->key.offset - (bytenr - cache->key.objectid)); if (pin) { cache->pinned += len; cache->space_info->bytes_pinned += len; fs_info->total_pinned += len; } else { cache->pinned -= len; cache->space_info->bytes_pinned -= len; fs_info->total_pinned -= len; } bytenr += len; num -= len; } return 0; } int btrfs_copy_pinned(struct btrfs_root *root, struct extent_io_tree *copy) { u64 last = 0; u64 start; u64 end; struct extent_io_tree *pinned_extents = &root->fs_info->pinned_extents; int ret; while(1) { ret = find_first_extent_bit(pinned_extents, last, &start, &end, EXTENT_DIRTY); if (ret) break; set_extent_dirty(copy, start, end, GFP_NOFS); last = end + 1; } return 0; } int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_io_tree *unpin) { u64 start; u64 end; int ret; struct extent_io_tree *free_space_cache; free_space_cache = &root->fs_info->free_space_cache; while(1) { ret = find_first_extent_bit(unpin, 0, &start, &end, EXTENT_DIRTY); if (ret) break; update_pinned_extents(root, start, end + 1 - start, 0); clear_extent_dirty(unpin, start, end, GFP_NOFS); set_extent_dirty(free_space_cache, start, end, GFP_NOFS); } return 0; } static int finish_current_insert(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root) { u64 start; u64 end; u64 priv; struct btrfs_fs_info *info = extent_root->fs_info; struct btrfs_path *path; struct pending_extent_op *extent_op; struct btrfs_key key; int ret; path = btrfs_alloc_path(); while(1) { ret = find_first_extent_bit(&info->extent_ins, 0, &start, &end, EXTENT_LOCKED); if (ret) break; ret = get_state_private(&info->extent_ins, start, &priv); BUG_ON(ret); extent_op = (struct pending_extent_op *)(unsigned long)priv; if (extent_op->type == PENDING_EXTENT_INSERT) { key.objectid = start; key.offset = end + 1 - start; key.type = BTRFS_EXTENT_ITEM_KEY; ret = alloc_reserved_tree_block(trans, extent_root, extent_root->root_key.objectid, trans->transid, extent_op->flags, &extent_op->key, extent_op->level, &key); } else { BUG_ON(1); } clear_extent_bits(&info->extent_ins, start, end, EXTENT_LOCKED, GFP_NOFS); kfree(extent_op); } btrfs_free_path(path); return 0; } static int pin_down_bytes(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, int is_data) { int err = 0; struct extent_buffer *buf; if (is_data) goto pinit; buf = btrfs_find_tree_block(root, bytenr, num_bytes); if (!buf) goto pinit; /* we can reuse a block if it hasn't been written * and it is from this transaction. We can't * reuse anything from the tree log root because * it has tiny sub-transactions. */ if (btrfs_buffer_uptodate(buf, 0)) { u64 header_owner = btrfs_header_owner(buf); u64 header_transid = btrfs_header_generation(buf); if (header_owner != BTRFS_TREE_LOG_OBJECTID && header_transid == trans->transid && !btrfs_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN)) { clean_tree_block(NULL, root, buf); free_extent_buffer(buf); return 1; } } free_extent_buffer(buf); pinit: update_pinned_extents(root, bytenr, num_bytes, 1); BUG_ON(err < 0); return 0; } /* * remove an extent from the root, returns 0 on success */ static int __free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner_objectid, u64 owner_offset, int refs_to_drop) { struct btrfs_key key; struct btrfs_path *path; struct btrfs_extent_ops *ops = root->fs_info->extent_ops; struct btrfs_root *extent_root = root->fs_info->extent_root; struct extent_buffer *leaf; struct btrfs_extent_item *ei; struct btrfs_extent_inline_ref *iref; int ret; int is_data; int extent_slot = 0; int found_extent = 0; int num_to_del = 1; u32 item_size; u64 refs; path = btrfs_alloc_path(); if (!path) return -ENOMEM; path->reada = 1; path->leave_spinning = 1; is_data = owner_objectid >= BTRFS_FIRST_FREE_OBJECTID; BUG_ON(!is_data && refs_to_drop != 1); ret = lookup_extent_backref(trans, extent_root, path, &iref, bytenr, num_bytes, parent, root_objectid, owner_objectid, owner_offset); if (ret == 0) { extent_slot = path->slots[0]; while (extent_slot >= 0) { btrfs_item_key_to_cpu(path->nodes[0], &key, extent_slot); if (key.objectid != bytenr) break; if (key.type == BTRFS_EXTENT_ITEM_KEY && key.offset == num_bytes) { found_extent = 1; break; } if (path->slots[0] - extent_slot > 5) break; extent_slot--; } #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 item_size = btrfs_item_size_nr(path->nodes[0], extent_slot); if (found_extent && item_size < sizeof(*ei)) found_extent = 0; #endif if (!found_extent) { BUG_ON(iref); ret = remove_extent_backref(trans, extent_root, path, NULL, refs_to_drop, is_data); BUG_ON(ret); btrfs_release_path(extent_root, path); path->leave_spinning = 1; key.objectid = bytenr; key.type = BTRFS_EXTENT_ITEM_KEY; key.offset = num_bytes; ret = btrfs_search_slot(trans, extent_root, &key, path, -1, 1); if (ret) { printk(KERN_ERR "umm, got %d back from search" ", was looking for %llu\n", ret, (unsigned long long)bytenr); btrfs_print_leaf(extent_root, path->nodes[0]); } BUG_ON(ret); extent_slot = path->slots[0]; } } else { btrfs_print_leaf(extent_root, path->nodes[0]); WARN_ON(1); printk(KERN_ERR "btrfs unable to find ref byte nr %llu " "parent %llu root %llu owner %llu offset %llu\n", (unsigned long long)bytenr, (unsigned long long)parent, (unsigned long long)root_objectid, (unsigned long long)owner_objectid, (unsigned long long)owner_offset); } leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, extent_slot); #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 if (item_size < sizeof(*ei)) { BUG_ON(found_extent || extent_slot != path->slots[0]); ret = convert_extent_item_v0(trans, extent_root, path, owner_objectid, 0); BUG_ON(ret < 0); btrfs_release_path(extent_root, path); path->leave_spinning = 1; key.objectid = bytenr; key.type = BTRFS_EXTENT_ITEM_KEY; key.offset = num_bytes; ret = btrfs_search_slot(trans, extent_root, &key, path, -1, 1); if (ret) { printk(KERN_ERR "umm, got %d back from search" ", was looking for %llu\n", ret, (unsigned long long)bytenr); btrfs_print_leaf(extent_root, path->nodes[0]); } BUG_ON(ret); extent_slot = path->slots[0]; leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, extent_slot); } #endif BUG_ON(item_size < sizeof(*ei)); ei = btrfs_item_ptr(leaf, extent_slot, struct btrfs_extent_item); if (owner_objectid < BTRFS_FIRST_FREE_OBJECTID) { struct btrfs_tree_block_info *bi; BUG_ON(item_size < sizeof(*ei) + sizeof(*bi)); bi = (struct btrfs_tree_block_info *)(ei + 1); WARN_ON(owner_objectid != btrfs_tree_block_level(leaf, bi)); } refs = btrfs_extent_refs(leaf, ei); BUG_ON(refs < refs_to_drop); refs -= refs_to_drop; if (refs > 0) { /* * In the case of inline back ref, reference count will * be updated by remove_extent_backref */ if (iref) { BUG_ON(!found_extent); } else { btrfs_set_extent_refs(leaf, ei, refs); btrfs_mark_buffer_dirty(leaf); } if (found_extent) { ret = remove_extent_backref(trans, extent_root, path, iref, refs_to_drop, is_data); BUG_ON(ret); } } else { int mark_free = 0; int pin = 1; if (found_extent) { BUG_ON(is_data && refs_to_drop != extent_data_ref_count(root, path, iref)); if (iref) { BUG_ON(path->slots[0] != extent_slot); } else { BUG_ON(path->slots[0] != extent_slot + 1); path->slots[0] = extent_slot; num_to_del = 2; } } if (ops && ops->free_extent) { ret = ops->free_extent(root, bytenr, num_bytes); if (ret > 0) { pin = 0; mark_free = 0; } } if (pin) { ret = pin_down_bytes(trans, root, bytenr, num_bytes, is_data); if (ret > 0) mark_free = 1; BUG_ON(ret < 0); } ret = btrfs_del_items(trans, extent_root, path, path->slots[0], num_to_del); BUG_ON(ret); btrfs_release_path(extent_root, path); if (is_data) { ret = btrfs_del_csums(trans, root, bytenr, num_bytes); BUG_ON(ret); } ret = update_block_group(trans, root, bytenr, num_bytes, 0, mark_free); BUG_ON(ret); } btrfs_free_path(path); finish_current_insert(trans, extent_root); return ret; } /* * find all the blocks marked as pending in the radix tree and remove * them from the extent map */ static int del_pending_extents(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root) { int ret; int err = 0; u64 start; u64 end; u64 priv; struct extent_io_tree *pending_del; struct extent_io_tree *extent_ins; struct pending_extent_op *extent_op; extent_ins = &extent_root->fs_info->extent_ins; pending_del = &extent_root->fs_info->pending_del; while(1) { ret = find_first_extent_bit(pending_del, 0, &start, &end, EXTENT_LOCKED); if (ret) break; ret = get_state_private(pending_del, start, &priv); BUG_ON(ret); extent_op = (struct pending_extent_op *)(unsigned long)priv; clear_extent_bits(pending_del, start, end, EXTENT_LOCKED, GFP_NOFS); if (!test_range_bit(extent_ins, start, end, EXTENT_LOCKED, 0)) { ret = __free_extent(trans, extent_root, start, end + 1 - start, 0, extent_root->root_key.objectid, extent_op->level, 0, 1); kfree(extent_op); } else { kfree(extent_op); ret = get_state_private(extent_ins, start, &priv); BUG_ON(ret); extent_op = (struct pending_extent_op *) (unsigned long)priv; clear_extent_bits(extent_ins, start, end, EXTENT_LOCKED, GFP_NOFS); if (extent_op->type == PENDING_BACKREF_UPDATE) BUG_ON(1); kfree(extent_op); } if (ret) err = ret; } return err; } /* * remove an extent from the root, returns 0 on success */ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid, u64 owner, u64 offset) { struct btrfs_root *extent_root = root->fs_info->extent_root; int pending_ret; int ret; WARN_ON(num_bytes < root->sectorsize); if (root == extent_root) { struct pending_extent_op *extent_op; extent_op = kmalloc(sizeof(*extent_op), GFP_NOFS); BUG_ON(!extent_op); extent_op->type = PENDING_EXTENT_DELETE; extent_op->bytenr = bytenr; extent_op->num_bytes = num_bytes; extent_op->level = (int)owner; set_extent_bits(&root->fs_info->pending_del, bytenr, bytenr + num_bytes - 1, EXTENT_LOCKED, GFP_NOFS); set_state_private(&root->fs_info->pending_del, bytenr, (unsigned long)extent_op); return 0; } ret = __free_extent(trans, root, bytenr, num_bytes, parent, root_objectid, owner, offset, 1); pending_ret = del_pending_extents(trans, root->fs_info->extent_root); return ret ? ret : pending_ret; } static u64 stripe_align(struct btrfs_root *root, u64 val) { u64 mask = ((u64)root->stripesize - 1); u64 ret = (val + mask) & ~mask; return ret; } /* * walks the btree of allocated extents and find a hole of a given size. * The key ins is changed to record the hole: * ins->objectid == block start * ins->flags = BTRFS_EXTENT_ITEM_KEY * ins->offset == number of blocks * Any available blocks before search_start are skipped. */ static int noinline find_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *orig_root, u64 num_bytes, u64 empty_size, u64 search_start, u64 search_end, u64 hint_byte, struct btrfs_key *ins, u64 exclude_start, u64 exclude_nr, int data) { int ret; u64 orig_search_start = search_start; struct btrfs_root * root = orig_root->fs_info->extent_root; struct btrfs_fs_info *info = root->fs_info; u64 total_needed = num_bytes; struct btrfs_block_group_cache *block_group; int full_scan = 0; int wrapped = 0; WARN_ON(num_bytes < root->sectorsize); btrfs_set_key_type(ins, BTRFS_EXTENT_ITEM_KEY); if (hint_byte) { block_group = btrfs_lookup_first_block_group(info, hint_byte); if (!block_group) hint_byte = search_start; block_group = btrfs_find_block_group(root, block_group, hint_byte, data, 1); } else { block_group = btrfs_find_block_group(root, trans->block_group, search_start, data, 1); } total_needed += empty_size; check_failed: if (!block_group) { block_group = btrfs_lookup_first_block_group(info, search_start); if (!block_group) block_group = btrfs_lookup_first_block_group(info, orig_search_start); } ret = find_search_start(root, &block_group, &search_start, total_needed, data); if (ret) goto error; search_start = stripe_align(root, search_start); ins->objectid = search_start; ins->offset = num_bytes; if (ins->objectid + num_bytes > block_group->key.objectid + block_group->key.offset) { search_start = block_group->key.objectid + block_group->key.offset; goto new_group; } if (test_range_bit(&info->extent_ins, ins->objectid, ins->objectid + num_bytes -1, EXTENT_LOCKED, 0)) { search_start = ins->objectid + num_bytes; goto new_group; } if (test_range_bit(&info->pinned_extents, ins->objectid, ins->objectid + num_bytes -1, EXTENT_DIRTY, 0)) { search_start = ins->objectid + num_bytes; goto new_group; } if (exclude_nr > 0 && (ins->objectid + num_bytes > exclude_start && ins->objectid < exclude_start + exclude_nr)) { search_start = exclude_start + exclude_nr; goto new_group; } if (!(data & BTRFS_BLOCK_GROUP_DATA)) { block_group = btrfs_lookup_block_group(info, ins->objectid); if (block_group) trans->block_group = block_group; } ins->offset = num_bytes; return 0; new_group: block_group = btrfs_lookup_first_block_group(info, search_start); if (!block_group) { search_start = orig_search_start; if (full_scan) { ret = -ENOSPC; goto error; } if (wrapped) { if (!full_scan) total_needed -= empty_size; full_scan = 1; } else wrapped = 1; } cond_resched(); block_group = btrfs_find_block_group(root, block_group, search_start, data, 0); goto check_failed; error: return ret; } static int btrfs_reserve_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 num_bytes, u64 empty_size, u64 hint_byte, u64 search_end, struct btrfs_key *ins, int data) { int ret; u64 search_start = 0; u64 alloc_profile; struct btrfs_fs_info *info = root->fs_info; if (info->extent_ops) { struct btrfs_extent_ops *ops = info->extent_ops; ret = ops->alloc_extent(root, num_bytes, hint_byte, ins); BUG_ON(ret); goto found; } if (data) { alloc_profile = info->avail_data_alloc_bits & info->data_alloc_profile; data = BTRFS_BLOCK_GROUP_DATA | alloc_profile; } else if ((info->system_allocs > 0 || root == info->chunk_root) && info->system_allocs >= 0) { alloc_profile = info->avail_system_alloc_bits & info->system_alloc_profile; data = BTRFS_BLOCK_GROUP_SYSTEM | alloc_profile; } else { alloc_profile = info->avail_metadata_alloc_bits & info->metadata_alloc_profile; data = BTRFS_BLOCK_GROUP_METADATA | alloc_profile; } if (root->ref_cows) { if (!(data & BTRFS_BLOCK_GROUP_METADATA)) { ret = do_chunk_alloc(trans, root->fs_info->extent_root, num_bytes, BTRFS_BLOCK_GROUP_METADATA); BUG_ON(ret); } ret = do_chunk_alloc(trans, root->fs_info->extent_root, num_bytes + 2 * 1024 * 1024, data); BUG_ON(ret); } WARN_ON(num_bytes < root->sectorsize); ret = find_free_extent(trans, root, num_bytes, empty_size, search_start, search_end, hint_byte, ins, trans->alloc_exclude_start, trans->alloc_exclude_nr, data); BUG_ON(ret); found: clear_extent_dirty(&root->fs_info->free_space_cache, ins->objectid, ins->objectid + ins->offset - 1, GFP_NOFS); return ret; } static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 root_objectid, u64 generation, u64 flags, struct btrfs_disk_key *key, int level, struct btrfs_key *ins) { int ret; struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_extent_item *extent_item; struct btrfs_tree_block_info *block_info; struct btrfs_extent_inline_ref *iref; struct btrfs_path *path; struct extent_buffer *leaf; u32 size = sizeof(*extent_item) + sizeof(*block_info) + sizeof(*iref); path = btrfs_alloc_path(); BUG_ON(!path); path->leave_spinning = 1; ret = btrfs_insert_empty_item(trans, fs_info->extent_root, path, ins, size); BUG_ON(ret); leaf = path->nodes[0]; extent_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); btrfs_set_extent_refs(leaf, extent_item, 1); btrfs_set_extent_generation(leaf, extent_item, generation); btrfs_set_extent_flags(leaf, extent_item, flags | BTRFS_EXTENT_FLAG_TREE_BLOCK); block_info = (struct btrfs_tree_block_info *)(extent_item + 1); btrfs_set_tree_block_key(leaf, block_info, key); btrfs_set_tree_block_level(leaf, block_info, level); iref = (struct btrfs_extent_inline_ref *)(block_info + 1); btrfs_set_extent_inline_ref_type(leaf, iref, BTRFS_TREE_BLOCK_REF_KEY); btrfs_set_extent_inline_ref_offset(leaf, iref, root_objectid); btrfs_mark_buffer_dirty(leaf); btrfs_free_path(path); ret = update_block_group(trans, root, ins->objectid, ins->offset, 1, 0); if (ret) { printk(KERN_ERR "btrfs update block group failed for %llu " "%llu\n", (unsigned long long)ins->objectid, (unsigned long long)ins->offset); BUG(); } return ret; } static int alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 num_bytes, u64 root_objectid, u64 generation, u64 flags, struct btrfs_disk_key *key, int level, u64 empty_size, u64 hint_byte, u64 search_end, struct btrfs_key *ins) { int ret; ret = btrfs_reserve_extent(trans, root, num_bytes, empty_size, hint_byte, search_end, ins, 0); BUG_ON(ret); if (root_objectid == BTRFS_EXTENT_TREE_OBJECTID) { struct pending_extent_op *extent_op; extent_op = kmalloc(sizeof(*extent_op), GFP_NOFS); BUG_ON(!extent_op); extent_op->type = PENDING_EXTENT_INSERT; extent_op->bytenr = ins->objectid; extent_op->num_bytes = ins->offset; extent_op->level = level; extent_op->flags = flags; memcpy(&extent_op->key, key, sizeof(*key)); set_extent_bits(&root->fs_info->extent_ins, ins->objectid, ins->objectid + ins->offset - 1, EXTENT_LOCKED, GFP_NOFS); set_state_private(&root->fs_info->extent_ins, ins->objectid, (unsigned long)extent_op); } else { ret = alloc_reserved_tree_block(trans, root, root_objectid, generation, flags, key, level, ins); finish_current_insert(trans, root->fs_info->extent_root); del_pending_extents(trans, root->fs_info->extent_root); } return ret; } /* * helper function to allocate a block for a given tree * returns the tree buffer or NULL. */ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u32 blocksize, u64 root_objectid, struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_key ins; int ret; struct extent_buffer *buf; ret = alloc_tree_block(trans, root, blocksize, root_objectid, trans->transid, 0, key, level, empty_size, hint, (u64)-1, &ins); if (ret) { BUG_ON(ret > 0); return ERR_PTR(ret); } buf = btrfs_find_create_tree_block(root, ins.objectid, blocksize); if (!buf) { btrfs_free_extent(trans, root, ins.objectid, ins.offset, 0, root->root_key.objectid, level, 0); BUG_ON(1); return ERR_PTR(-ENOMEM); } btrfs_set_buffer_uptodate(buf); trans->blocks_used++; return buf; } #if 0 static int noinline drop_leaf_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *leaf) { u64 leaf_owner; u64 leaf_generation; struct btrfs_key key; struct btrfs_file_extent_item *fi; int i; int nritems; int ret; BUG_ON(!btrfs_is_leaf(leaf)); nritems = btrfs_header_nritems(leaf); leaf_owner = btrfs_header_owner(leaf); leaf_generation = btrfs_header_generation(leaf); for (i = 0; i < nritems; i++) { u64 disk_bytenr; btrfs_item_key_to_cpu(leaf, &key, i); if (btrfs_key_type(&key) != BTRFS_EXTENT_DATA_KEY) continue; fi = btrfs_item_ptr(leaf, i, struct btrfs_file_extent_item); if (btrfs_file_extent_type(leaf, fi) == BTRFS_FILE_EXTENT_INLINE) continue; /* * FIXME make sure to insert a trans record that * repeats the snapshot del on crash */ disk_bytenr = btrfs_file_extent_disk_bytenr(leaf, fi); if (disk_bytenr == 0) continue; ret = btrfs_free_extent(trans, root, disk_bytenr, btrfs_file_extent_disk_num_bytes(leaf, fi), leaf->start, leaf_owner, leaf_generation, key.objectid, 0); BUG_ON(ret); } return 0; } static void noinline reada_walk_down(struct btrfs_root *root, struct extent_buffer *node, int slot) { u64 bytenr; u64 last = 0; u32 nritems; u32 refs; u32 blocksize; int ret; int i; int level; int skipped = 0; nritems = btrfs_header_nritems(node); level = btrfs_header_level(node); if (level) return; for (i = slot; i < nritems && skipped < 32; i++) { bytenr = btrfs_node_blockptr(node, i); if (last && ((bytenr > last && bytenr - last > 32 * 1024) || (last > bytenr && last - bytenr > 32 * 1024))) { skipped++; continue; } blocksize = btrfs_level_size(root, level - 1); if (i != slot) { ret = btrfs_lookup_extent_ref(NULL, root, bytenr, blocksize, &refs); BUG_ON(ret); if (refs != 1) { skipped++; continue; } } mutex_unlock(&root->fs_info->fs_mutex); ret = readahead_tree_block(root, bytenr, blocksize, btrfs_node_ptr_generation(node, i)); last = bytenr + blocksize; cond_resched(); mutex_lock(&root->fs_info->fs_mutex); if (ret) break; } } /* * helper function for drop_snapshot, this walks down the tree dropping ref * counts as it goes. */ static int noinline walk_down_tree(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int *level) { u64 root_owner; u64 root_gen; u64 bytenr; u64 ptr_gen; struct extent_buffer *next; struct extent_buffer *cur; struct extent_buffer *parent; u32 blocksize; int ret; u32 refs; WARN_ON(*level < 0); WARN_ON(*level >= BTRFS_MAX_LEVEL); ret = btrfs_lookup_extent_ref(trans, root, path->nodes[*level]->start, path->nodes[*level]->len, &refs); BUG_ON(ret); if (refs > 1) goto out; /* * walk down to the last node level and free all the leaves */ while(*level >= 0) { WARN_ON(*level < 0); WARN_ON(*level >= BTRFS_MAX_LEVEL); cur = path->nodes[*level]; if (btrfs_header_level(cur) != *level) WARN_ON(1); if (path->slots[*level] >= btrfs_header_nritems(cur)) break; if (*level == 0) { ret = drop_leaf_ref(trans, root, cur); BUG_ON(ret); break; } bytenr = btrfs_node_blockptr(cur, path->slots[*level]); ptr_gen = btrfs_node_ptr_generation(cur, path->slots[*level]); blocksize = btrfs_level_size(root, *level - 1); ret = btrfs_lookup_extent_ref(trans, root, bytenr, blocksize, &refs); BUG_ON(ret); if (refs != 1) { parent = path->nodes[*level]; root_owner = btrfs_header_owner(parent); root_gen = btrfs_header_generation(parent); path->slots[*level]++; ret = btrfs_free_extent(trans, root, bytenr, blocksize, parent->start, root_owner, root_gen, *level - 1, 1); BUG_ON(ret); continue; } next = btrfs_find_tree_block(root, bytenr, blocksize); if (!next || !btrfs_buffer_uptodate(next, ptr_gen)) { free_extent_buffer(next); reada_walk_down(root, cur, path->slots[*level]); mutex_unlock(&root->fs_info->fs_mutex); next = read_tree_block(root, bytenr, blocksize, ptr_gen); mutex_lock(&root->fs_info->fs_mutex); } WARN_ON(*level <= 0); if (path->nodes[*level-1]) free_extent_buffer(path->nodes[*level-1]); path->nodes[*level-1] = next; *level = btrfs_header_level(next); path->slots[*level] = 0; } out: WARN_ON(*level < 0); WARN_ON(*level >= BTRFS_MAX_LEVEL); if (path->nodes[*level] == root->node) { root_owner = root->root_key.objectid; parent = path->nodes[*level]; } else { parent = path->nodes[*level + 1]; root_owner = btrfs_header_owner(parent); } root_gen = btrfs_header_generation(parent); ret = btrfs_free_extent(trans, root, path->nodes[*level]->start, path->nodes[*level]->len, parent->start, root_owner, root_gen, *level, 1); free_extent_buffer(path->nodes[*level]); path->nodes[*level] = NULL; *level += 1; BUG_ON(ret); return 0; } /* * helper for dropping snapshots. This walks back up the tree in the path * to find the first node higher up where we haven't yet gone through * all the slots */ static int noinline walk_up_tree(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int *level) { u64 root_owner; u64 root_gen; struct btrfs_root_item *root_item = &root->root_item; int i; int slot; int ret; for(i = *level; i < BTRFS_MAX_LEVEL - 1 && path->nodes[i]; i++) { slot = path->slots[i]; if (slot < btrfs_header_nritems(path->nodes[i]) - 1) { struct extent_buffer *node; struct btrfs_disk_key disk_key; node = path->nodes[i]; path->slots[i]++; *level = i; WARN_ON(*level == 0); btrfs_node_key(node, &disk_key, path->slots[i]); memcpy(&root_item->drop_progress, &disk_key, sizeof(disk_key)); root_item->drop_level = i; return 0; } else { struct extent_buffer *parent; if (path->nodes[*level] == root->node) parent = path->nodes[*level]; else parent = path->nodes[*level + 1]; root_owner = btrfs_header_owner(parent); root_gen = btrfs_header_generation(parent); ret = btrfs_free_extent(trans, root, path->nodes[*level]->start, path->nodes[*level]->len, parent->start, root_owner, root_gen, *level, 1); BUG_ON(ret); free_extent_buffer(path->nodes[*level]); path->nodes[*level] = NULL; *level = i + 1; } } return 1; } /* * drop the reference count on the tree rooted at 'snap'. This traverses * the tree freeing any blocks that have a ref count of zero after being * decremented. */ int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root *root) { int ret = 0; int wret; int level; struct btrfs_path *path; int i; int orig_level; struct btrfs_root_item *root_item = &root->root_item; path = btrfs_alloc_path(); BUG_ON(!path); level = btrfs_header_level(root->node); orig_level = level; if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) { path->nodes[level] = root->node; extent_buffer_get(root->node); path->slots[level] = 0; } else { struct btrfs_key key; struct btrfs_disk_key found_key; struct extent_buffer *node; btrfs_disk_key_to_cpu(&key, &root_item->drop_progress); level = root_item->drop_level; path->lowest_level = level; wret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (wret < 0) { ret = wret; goto out; } node = path->nodes[level]; btrfs_node_key(node, &found_key, path->slots[level]); WARN_ON(memcmp(&found_key, &root_item->drop_progress, sizeof(found_key))); } while(1) { wret = walk_down_tree(trans, root, path, &level); if (wret < 0) ret = wret; if (wret != 0) break; wret = walk_up_tree(trans, root, path, &level); if (wret < 0) ret = wret; if (wret != 0) break; /* ret = -EAGAIN; break; */ } for (i = 0; i <= orig_level; i++) { if (path->nodes[i]) { free_extent_buffer(path->nodes[i]); path->nodes[i] = NULL; } } out: btrfs_free_path(path); return ret; } #endif int btrfs_free_block_groups(struct btrfs_fs_info *info) { u64 start; u64 end; u64 ptr; int ret; while(1) { ret = find_first_extent_bit(&info->block_group_cache, 0, &start, &end, (unsigned int)-1); if (ret) break; ret = get_state_private(&info->block_group_cache, start, &ptr); if (!ret) kfree((void *)(unsigned long)ptr); clear_extent_bits(&info->block_group_cache, start, end, (unsigned int)-1, GFP_NOFS); } while(1) { ret = find_first_extent_bit(&info->free_space_cache, 0, &start, &end, EXTENT_DIRTY); if (ret) break; clear_extent_dirty(&info->free_space_cache, start, end, GFP_NOFS); } return 0; } int find_first_block_group(struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *key) { int ret; struct btrfs_key found_key; struct extent_buffer *leaf; int slot; ret = btrfs_search_slot(NULL, root, key, path, 0, 0); if (ret < 0) return ret; while(1) { slot = path->slots[0]; leaf = path->nodes[0]; if (slot >= btrfs_header_nritems(leaf)) { ret = btrfs_next_leaf(root, path); if (ret == 0) continue; if (ret < 0) goto error; break; } btrfs_item_key_to_cpu(leaf, &found_key, slot); if (found_key.objectid >= key->objectid && found_key.type == BTRFS_BLOCK_GROUP_ITEM_KEY) return 0; path->slots[0]++; } ret = -ENOENT; error: return ret; } int btrfs_read_block_groups(struct btrfs_root *root) { struct btrfs_path *path; int ret; int bit; struct btrfs_block_group_cache *cache; struct btrfs_fs_info *info = root->fs_info; struct btrfs_space_info *space_info; struct extent_io_tree *block_group_cache; struct btrfs_key key; struct btrfs_key found_key; struct extent_buffer *leaf; block_group_cache = &info->block_group_cache; root = info->extent_root; key.objectid = 0; key.offset = 0; btrfs_set_key_type(&key, BTRFS_BLOCK_GROUP_ITEM_KEY); path = btrfs_alloc_path(); if (!path) return -ENOMEM; while(1) { ret = find_first_block_group(root, path, &key); if (ret > 0) { ret = 0; goto error; } if (ret != 0) { goto error; } leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); cache = kzalloc(sizeof(*cache), GFP_NOFS); if (!cache) { ret = -ENOMEM; break; } read_extent_buffer(leaf, &cache->item, btrfs_item_ptr_offset(leaf, path->slots[0]), sizeof(cache->item)); memcpy(&cache->key, &found_key, sizeof(found_key)); cache->cached = 0; cache->pinned = 0; key.objectid = found_key.objectid + found_key.offset; btrfs_release_path(root, path); cache->flags = btrfs_block_group_flags(&cache->item); bit = 0; if (cache->flags & BTRFS_BLOCK_GROUP_DATA) { bit = BLOCK_GROUP_DATA; } else if (cache->flags & BTRFS_BLOCK_GROUP_SYSTEM) { bit = BLOCK_GROUP_SYSTEM; } else if (cache->flags & BTRFS_BLOCK_GROUP_METADATA) { bit = BLOCK_GROUP_METADATA; } set_avail_alloc_bits(info, cache->flags); if (btrfs_chunk_readonly(root, cache->key.objectid)) cache->ro = 1; ret = update_space_info(info, cache->flags, found_key.offset, btrfs_block_group_used(&cache->item), &space_info); BUG_ON(ret); cache->space_info = space_info; /* use EXTENT_LOCKED to prevent merging */ set_extent_bits(block_group_cache, found_key.objectid, found_key.objectid + found_key.offset - 1, bit | EXTENT_LOCKED, GFP_NOFS); set_state_private(block_group_cache, found_key.objectid, (unsigned long)cache); } ret = 0; error: btrfs_free_path(path); return ret; } int btrfs_make_block_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytes_used, u64 type, u64 chunk_objectid, u64 chunk_offset, u64 size) { int ret; int bit = 0; struct btrfs_root *extent_root; struct btrfs_block_group_cache *cache; struct extent_io_tree *block_group_cache; extent_root = root->fs_info->extent_root; block_group_cache = &root->fs_info->block_group_cache; cache = kzalloc(sizeof(*cache), GFP_NOFS); BUG_ON(!cache); cache->key.objectid = chunk_offset; cache->key.offset = size; btrfs_set_key_type(&cache->key, BTRFS_BLOCK_GROUP_ITEM_KEY); btrfs_set_block_group_used(&cache->item, bytes_used); btrfs_set_block_group_chunk_objectid(&cache->item, chunk_objectid); cache->flags = type; btrfs_set_block_group_flags(&cache->item, type); ret = update_space_info(root->fs_info, cache->flags, size, bytes_used, &cache->space_info); BUG_ON(ret); bit = block_group_state_bits(type); set_extent_bits(block_group_cache, chunk_offset, chunk_offset + size - 1, bit | EXTENT_LOCKED, GFP_NOFS); set_state_private(block_group_cache, chunk_offset, (unsigned long)cache); ret = btrfs_insert_item(trans, extent_root, &cache->key, &cache->item, sizeof(cache->item)); BUG_ON(ret); finish_current_insert(trans, extent_root); ret = del_pending_extents(trans, extent_root); BUG_ON(ret); set_avail_alloc_bits(extent_root->fs_info, type); return 0; } /* * This is for converter use only. * * In that case, we don't know where are free blocks located. * Therefore all block group cache entries must be setup properly * before doing any block allocation. */ int btrfs_make_block_groups(struct btrfs_trans_handle *trans, struct btrfs_root *root) { u64 total_bytes; u64 cur_start; u64 group_type; u64 group_size; u64 group_align; u64 total_data = 0; u64 total_metadata = 0; u64 chunk_objectid; int ret; int bit; struct btrfs_root *extent_root; struct btrfs_block_group_cache *cache; struct extent_io_tree *block_group_cache; extent_root = root->fs_info->extent_root; block_group_cache = &root->fs_info->block_group_cache; chunk_objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; total_bytes = btrfs_super_total_bytes(&root->fs_info->super_copy); group_align = 64 * root->sectorsize; cur_start = 0; while (cur_start < total_bytes) { group_size = total_bytes / 12; group_size = min_t(u64, group_size, total_bytes - cur_start); if (cur_start == 0) { bit = BLOCK_GROUP_SYSTEM; group_type = BTRFS_BLOCK_GROUP_SYSTEM; group_size /= 4; group_size &= ~(group_align - 1); group_size = max_t(u64, group_size, 8 * 1024 * 1024); group_size = min_t(u64, group_size, 32 * 1024 * 1024); } else { group_size &= ~(group_align - 1); if (total_data >= total_metadata * 2) { group_type = BTRFS_BLOCK_GROUP_METADATA; group_size = min_t(u64, group_size, 1ULL * 1024 * 1024 * 1024); total_metadata += group_size; } else { group_type = BTRFS_BLOCK_GROUP_DATA; group_size = min_t(u64, group_size, 5ULL * 1024 * 1024 * 1024); total_data += group_size; } if ((total_bytes - cur_start) * 4 < group_size * 5) group_size = total_bytes - cur_start; } cache = kzalloc(sizeof(*cache), GFP_NOFS); BUG_ON(!cache); cache->key.objectid = cur_start; cache->key.offset = group_size; btrfs_set_key_type(&cache->key, BTRFS_BLOCK_GROUP_ITEM_KEY); btrfs_set_block_group_used(&cache->item, 0); btrfs_set_block_group_chunk_objectid(&cache->item, chunk_objectid); btrfs_set_block_group_flags(&cache->item, group_type); cache->flags = group_type; ret = update_space_info(root->fs_info, group_type, group_size, 0, &cache->space_info); BUG_ON(ret); set_avail_alloc_bits(extent_root->fs_info, group_type); set_extent_bits(block_group_cache, cur_start, cur_start + group_size - 1, bit | EXTENT_LOCKED, GFP_NOFS); set_state_private(block_group_cache, cur_start, (unsigned long)cache); cur_start += group_size; } /* then insert all the items */ cur_start = 0; while(cur_start < total_bytes) { cache = btrfs_lookup_block_group(root->fs_info, cur_start); BUG_ON(!cache); ret = btrfs_insert_item(trans, extent_root, &cache->key, &cache->item, sizeof(cache->item)); BUG_ON(ret); finish_current_insert(trans, extent_root); ret = del_pending_extents(trans, extent_root); BUG_ON(ret); cur_start = cache->key.objectid + cache->key.offset; } return 0; } int btrfs_update_block_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes, int alloc, int mark_free) { return update_block_group(trans, root, bytenr, num_bytes, alloc, mark_free); } partclone-0.2.51/src/btrfs/extent_io.c000066400000000000000000000432151200565264100176450ustar00rootroot00000000000000 /* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #define _XOPEN_SOURCE 600 #define __USE_XOPEN2K #include #include #include #include #include #include #include "kerncompat.h" #include "extent_io.h" #include "list.h" u64 cache_max = 1024 * 1024 * 32; void extent_io_tree_init(struct extent_io_tree *tree) { cache_tree_init(&tree->state); cache_tree_init(&tree->cache); INIT_LIST_HEAD(&tree->lru); tree->cache_size = 0; } static struct extent_state *alloc_extent_state(void) { struct extent_state *state; state = malloc(sizeof(*state)); if (!state) return NULL; state->refs = 1; state->state = 0; state->private = 0; return state; } static void free_extent_state(struct extent_state *state) { state->refs--; BUG_ON(state->refs < 0); if (state->refs == 0) free(state); } void extent_io_tree_cleanup(struct extent_io_tree *tree) { struct extent_state *es; struct extent_buffer *eb; struct cache_extent *cache; while(!list_empty(&tree->lru)) { eb = list_entry(tree->lru.next, struct extent_buffer, lru); if (eb->refs != 1) { fprintf(stderr, "extent buffer leak: " "start %llu len %u\n", (unsigned long long)eb->start, eb->len); eb->refs = 1; } free_extent_buffer(eb); } while (1) { cache = find_first_cache_extent(&tree->state, 0); if (!cache) break; es = container_of(cache, struct extent_state, cache_node); remove_cache_extent(&tree->state, &es->cache_node); free_extent_state(es); } } static inline void update_extent_state(struct extent_state *state) { state->cache_node.start = state->start; state->cache_node.size = state->end + 1 - state->start; } /* * Utility function to look for merge candidates inside a given range. * Any extents with matching state are merged together into a single * extent in the tree. Extents with EXTENT_IO in their state field are * not merged */ static int merge_state(struct extent_io_tree *tree, struct extent_state *state) { struct extent_state *other; struct cache_extent *other_node; if (state->state & EXTENT_IOBITS) return 0; other_node = prev_cache_extent(&state->cache_node); if (other_node) { other = container_of(other_node, struct extent_state, cache_node); if (other->end == state->start - 1 && other->state == state->state) { state->start = other->start; update_extent_state(state); remove_cache_extent(&tree->state, &other->cache_node); free_extent_state(other); } } other_node = next_cache_extent(&state->cache_node); if (other_node) { other = container_of(other_node, struct extent_state, cache_node); if (other->start == state->end + 1 && other->state == state->state) { other->start = state->start; update_extent_state(other); remove_cache_extent(&tree->state, &state->cache_node); free_extent_state(state); } } return 0; } /* * insert an extent_state struct into the tree. 'bits' are set on the * struct before it is inserted. */ static int insert_state(struct extent_io_tree *tree, struct extent_state *state, u64 start, u64 end, int bits) { int ret; BUG_ON(end < start); state->state |= bits; state->start = start; state->end = end; update_extent_state(state); ret = insert_existing_cache_extent(&tree->state, &state->cache_node); BUG_ON(ret); merge_state(tree, state); return 0; } /* * split a given extent state struct in two, inserting the preallocated * struct 'prealloc' as the newly created second half. 'split' indicates an * offset inside 'orig' where it should be split. */ static int split_state(struct extent_io_tree *tree, struct extent_state *orig, struct extent_state *prealloc, u64 split) { int ret; prealloc->start = orig->start; prealloc->end = split - 1; prealloc->state = orig->state; update_extent_state(prealloc); orig->start = split; update_extent_state(orig); ret = insert_existing_cache_extent(&tree->state, &prealloc->cache_node); BUG_ON(ret); return 0; } /* * clear some bits on a range in the tree. */ static int clear_state_bit(struct extent_io_tree *tree, struct extent_state *state, int bits) { int ret = state->state & bits; state->state &= ~bits; if (state->state == 0) { remove_cache_extent(&tree->state, &state->cache_node); free_extent_state(state); } else { merge_state(tree, state); } return ret; } /* * set some bits on a range in the tree. */ int clear_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, int bits, gfp_t mask) { struct extent_state *state; struct extent_state *prealloc = NULL; struct cache_extent *node; u64 last_end; int err; int set = 0; again: prealloc = alloc_extent_state(); if (!prealloc) return -ENOMEM; /* * this search will find the extents that end after * our range starts */ node = find_first_cache_extent(&tree->state, start); if (!node) goto out; state = container_of(node, struct extent_state, cache_node); if (state->start > end) goto out; last_end = state->end; /* * | ---- desired range ---- | * | state | or * | ------------- state -------------- | * * We need to split the extent we found, and may flip * bits on second half. * * If the extent we found extends past our range, we * just split and search again. It'll get split again * the next time though. * * If the extent we found is inside our range, we clear * the desired bit on it. */ if (state->start < start) { err = split_state(tree, state, prealloc, start); BUG_ON(err == -EEXIST); prealloc = NULL; if (err) goto out; if (state->end <= end) { set |= clear_state_bit(tree, state, bits); if (last_end == (u64)-1) goto out; start = last_end + 1; } else { start = state->start; } goto search_again; } /* * | ---- desired range ---- | * | state | * We need to split the extent, and clear the bit * on the first half */ if (state->start <= end && state->end > end) { err = split_state(tree, state, prealloc, end + 1); BUG_ON(err == -EEXIST); set |= clear_state_bit(tree, prealloc, bits); prealloc = NULL; goto out; } start = state->end + 1; set |= clear_state_bit(tree, state, bits); if (last_end == (u64)-1) goto out; start = last_end + 1; goto search_again; out: if (prealloc) free_extent_state(prealloc); return set; search_again: if (start > end) goto out; goto again; } /* * set some bits on a range in the tree. */ int set_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, int bits, gfp_t mask) { struct extent_state *state; struct extent_state *prealloc = NULL; struct cache_extent *node; int err = 0; int set; u64 last_start; u64 last_end; again: prealloc = alloc_extent_state(); if (!prealloc) return -ENOMEM; /* * this search will find the extents that end after * our range starts */ node = find_first_cache_extent(&tree->state, start); if (!node) { err = insert_state(tree, prealloc, start, end, bits); BUG_ON(err == -EEXIST); prealloc = NULL; goto out; } state = container_of(node, struct extent_state, cache_node); last_start = state->start; last_end = state->end; /* * | ---- desired range ---- | * | state | * * Just lock what we found and keep going */ if (state->start == start && state->end <= end) { set = state->state & bits; state->state |= bits; merge_state(tree, state); if (last_end == (u64)-1) goto out; start = last_end + 1; goto search_again; } /* * | ---- desired range ---- | * | state | * or * | ------------- state -------------- | * * We need to split the extent we found, and may flip bits on * second half. * * If the extent we found extends past our * range, we just split and search again. It'll get split * again the next time though. * * If the extent we found is inside our range, we set the * desired bit on it. */ if (state->start < start) { set = state->state & bits; err = split_state(tree, state, prealloc, start); BUG_ON(err == -EEXIST); prealloc = NULL; if (err) goto out; if (state->end <= end) { state->state |= bits; start = state->end + 1; merge_state(tree, state); if (last_end == (u64)-1) goto out; start = last_end + 1; } else { start = state->start; } goto search_again; } /* * | ---- desired range ---- | * | state | or | state | * * There's a hole, we need to insert something in it and * ignore the extent we found. */ if (state->start > start) { u64 this_end; if (end < last_start) this_end = end; else this_end = last_start -1; err = insert_state(tree, prealloc, start, this_end, bits); BUG_ON(err == -EEXIST); prealloc = NULL; if (err) goto out; start = this_end + 1; goto search_again; } /* * | ---- desired range ---- | * | ---------- state ---------- | * We need to split the extent, and set the bit * on the first half */ set = state->state & bits; err = split_state(tree, state, prealloc, end + 1); BUG_ON(err == -EEXIST); state->state |= bits; merge_state(tree, prealloc); prealloc = NULL; out: if (prealloc) free_extent_state(prealloc); return err; search_again: if (start > end) goto out; goto again; } int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask) { return set_extent_bits(tree, start, end, EXTENT_DIRTY, mask); } int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask) { return clear_extent_bits(tree, start, end, EXTENT_DIRTY, mask); } int find_first_extent_bit(struct extent_io_tree *tree, u64 start, u64 *start_ret, u64 *end_ret, int bits) { struct cache_extent *node; struct extent_state *state; int ret = 1; /* * this search will find all the extents that end after * our range starts. */ node = find_first_cache_extent(&tree->state, start); if (!node) goto out; while(1) { state = container_of(node, struct extent_state, cache_node); if (state->end >= start && (state->state & bits)) { *start_ret = state->start; *end_ret = state->end; ret = 0; break; } node = next_cache_extent(node); if (!node) break; } out: return ret; } int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits, int filled) { struct extent_state *state = NULL; struct cache_extent *node; int bitset = 0; node = find_first_cache_extent(&tree->state, start); while (node && start <= end) { state = container_of(node, struct extent_state, cache_node); if (filled && state->start > start) { bitset = 0; break; } if (state->start > end) break; if (state->state & bits) { bitset = 1; if (!filled) break; } else if (filled) { bitset = 0; break; } start = state->end + 1; if (start > end) break; node = next_cache_extent(node); if (!node) { if (filled) bitset = 0; break; } } return bitset; } int set_state_private(struct extent_io_tree *tree, u64 start, u64 private) { struct cache_extent *node; struct extent_state *state; int ret = 0; node = find_first_cache_extent(&tree->state, start); if (!node) { ret = -ENOENT; goto out; } state = container_of(node, struct extent_state, cache_node); if (state->start != start) { ret = -ENOENT; goto out; } state->private = private; out: return ret; } int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private) { struct cache_extent *node; struct extent_state *state; int ret = 0; node = find_first_cache_extent(&tree->state, start); if (!node) { ret = -ENOENT; goto out; } state = container_of(node, struct extent_state, cache_node); if (state->start != start) { ret = -ENOENT; goto out; } *private = state->private; out: return ret; } static int free_some_buffers(struct extent_io_tree *tree) { u32 nrscan = 0; struct extent_buffer *eb; struct list_head *node, *next; if (tree->cache_size < cache_max) return 0; list_for_each_safe(node, next, &tree->lru) { eb = list_entry(node, struct extent_buffer, lru); if (eb->refs == 1) { free_extent_buffer(eb); if (tree->cache_size < cache_max) break; } else { list_move_tail(&eb->lru, &tree->lru); } if (nrscan++ > 64) break; } return 0; } static struct extent_buffer *__alloc_extent_buffer(struct extent_io_tree *tree, u64 bytenr, u32 blocksize) { struct extent_buffer *eb; int ret; eb = malloc(sizeof(struct extent_buffer) + blocksize); if (!eb) { BUG(); return NULL; } eb->start = bytenr; eb->len = blocksize; eb->refs = 2; eb->flags = 0; eb->tree = tree; eb->fd = -1; eb->dev_bytenr = (u64)-1; eb->cache_node.start = bytenr; eb->cache_node.size = blocksize; free_some_buffers(tree); ret = insert_existing_cache_extent(&tree->cache, &eb->cache_node); if (ret) { free(eb); return NULL; } list_add_tail(&eb->lru, &tree->lru); tree->cache_size += blocksize; return eb; } void free_extent_buffer(struct extent_buffer *eb) { if (!eb) return; eb->refs--; BUG_ON(eb->refs < 0); if (eb->refs == 0) { struct extent_io_tree *tree = eb->tree; BUG_ON(eb->flags & EXTENT_DIRTY); list_del_init(&eb->lru); remove_cache_extent(&tree->cache, &eb->cache_node); BUG_ON(tree->cache_size < eb->len); tree->cache_size -= eb->len; free(eb); } } struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, u64 bytenr, u32 blocksize) { struct extent_buffer *eb = NULL; struct cache_extent *cache; cache = find_cache_extent(&tree->cache, bytenr, blocksize); if (cache && cache->start == bytenr && cache->size == blocksize) { eb = container_of(cache, struct extent_buffer, cache_node); list_move_tail(&eb->lru, &tree->lru); eb->refs++; } return eb; } struct extent_buffer *find_first_extent_buffer(struct extent_io_tree *tree, u64 start) { struct extent_buffer *eb = NULL; struct cache_extent *cache; cache = find_first_cache_extent(&tree->cache, start); if (cache) { eb = container_of(cache, struct extent_buffer, cache_node); list_move_tail(&eb->lru, &tree->lru); eb->refs++; } return eb; } struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, u64 bytenr, u32 blocksize) { struct extent_buffer *eb; struct cache_extent *cache; cache = find_cache_extent(&tree->cache, bytenr, blocksize); if (cache && cache->start == bytenr && cache->size == blocksize) { eb = container_of(cache, struct extent_buffer, cache_node); list_move_tail(&eb->lru, &tree->lru); eb->refs++; } else { if (cache) { eb = container_of(cache, struct extent_buffer, cache_node); BUG_ON(eb->refs != 1); free_extent_buffer(eb); } eb = __alloc_extent_buffer(tree, bytenr, blocksize); } return eb; } int read_extent_from_disk(struct extent_buffer *eb) { int ret; ret = pread(eb->fd, eb->data, eb->len, eb->dev_bytenr); if (ret < 0) goto out; if (ret != eb->len) { ret = -EIO; goto out; } ret = 0; out: return ret; } int write_extent_to_disk(struct extent_buffer *eb) { int ret; ret = pwrite(eb->fd, eb->data, eb->len, eb->dev_bytenr); if (ret < 0) goto out; if (ret != eb->len) { ret = -EIO; goto out; } ret = 0; out: return ret; } int set_extent_buffer_uptodate(struct extent_buffer *eb) { eb->flags |= EXTENT_UPTODATE; return 0; } int clear_extent_buffer_uptodate(struct extent_io_tree *tree, struct extent_buffer *eb) { eb->flags &= ~EXTENT_UPTODATE; return 0; } int extent_buffer_uptodate(struct extent_buffer *eb) { if (eb->flags & EXTENT_UPTODATE) return 1; return 0; } int set_extent_buffer_dirty(struct extent_buffer *eb) { struct extent_io_tree *tree = eb->tree; if (!(eb->flags & EXTENT_DIRTY)) { eb->flags |= EXTENT_DIRTY; set_extent_dirty(tree, eb->start, eb->start + eb->len - 1, 0); extent_buffer_get(eb); } return 0; } int clear_extent_buffer_dirty(struct extent_buffer *eb) { struct extent_io_tree *tree = eb->tree; if (eb->flags & EXTENT_DIRTY) { eb->flags &= ~EXTENT_DIRTY; clear_extent_dirty(tree, eb->start, eb->start + eb->len - 1, 0); free_extent_buffer(eb); } return 0; } int memcmp_extent_buffer(struct extent_buffer *eb, const void *ptrv, unsigned long start, unsigned long len) { return memcmp(eb->data + start, ptrv, len); } void read_extent_buffer(struct extent_buffer *eb, void *dst, unsigned long start, unsigned long len) { memcpy(dst, eb->data + start, len); } void write_extent_buffer(struct extent_buffer *eb, const void *src, unsigned long start, unsigned long len) { memcpy(eb->data + start, src, len); } void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src, unsigned long dst_offset, unsigned long src_offset, unsigned long len) { memcpy(dst->data + dst_offset, src->data + src_offset, len); } void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, unsigned long src_offset, unsigned long len) { memcpy(dst->data + dst_offset, dst->data + src_offset, len); } void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, unsigned long src_offset, unsigned long len) { memmove(dst->data + dst_offset, dst->data + src_offset, len); } void memset_extent_buffer(struct extent_buffer *eb, char c, unsigned long start, unsigned long len) { memset(eb->data + start, c, len); } partclone-0.2.51/src/btrfs/extent_io.h000066400000000000000000000102031200565264100176410ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __EXTENTMAP__ #define __EXTENTMAP__ #include "kerncompat.h" #include "extent-cache.h" #include "list.h" #define EXTENT_DIRTY 1 #define EXTENT_WRITEBACK (1 << 1) #define EXTENT_UPTODATE (1 << 2) #define EXTENT_LOCKED (1 << 3) #define EXTENT_NEW (1 << 4) #define EXTENT_DELALLOC (1 << 5) #define EXTENT_DEFRAG (1 << 6) #define EXTENT_DEFRAG_DONE (1 << 7) #define EXTENT_BUFFER_FILLED (1 << 8) #define EXTENT_CSUM (1 << 9) #define EXTENT_IOBITS (EXTENT_LOCKED | EXTENT_WRITEBACK) struct extent_io_tree { struct cache_tree state; struct cache_tree cache; struct list_head lru; u64 cache_size; }; struct extent_state { struct cache_extent cache_node; u64 start; u64 end; int refs; unsigned long state; u64 private; }; struct extent_buffer { struct cache_extent cache_node; u64 start; u64 dev_bytenr; u32 len; struct extent_io_tree *tree; struct list_head lru; int refs; int flags; int fd; char data[]; }; static inline void extent_buffer_get(struct extent_buffer *eb) { eb->refs++; } void extent_io_tree_init(struct extent_io_tree *tree); void extent_io_tree_cleanup(struct extent_io_tree *tree); int set_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, int bits, gfp_t mask); int clear_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, int bits, gfp_t mask); int find_first_extent_bit(struct extent_io_tree *tree, u64 start, u64 *start_ret, u64 *end_ret, int bits); int test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits, int filled); int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask); int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask); int extent_buffer_uptodate(struct extent_buffer *eb); int set_extent_buffer_uptodate(struct extent_buffer *eb); int clear_extent_buffer_uptodate(struct extent_io_tree *tree, struct extent_buffer *eb); int set_state_private(struct extent_io_tree *tree, u64 start, u64 private); int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private); struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree, u64 bytenr, u32 blocksize); struct extent_buffer *find_first_extent_buffer(struct extent_io_tree *tree, u64 start); struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, u64 bytenr, u32 blocksize); void free_extent_buffer(struct extent_buffer *eb); int read_extent_from_disk(struct extent_buffer *eb); int write_extent_to_disk(struct extent_buffer *eb); int memcmp_extent_buffer(struct extent_buffer *eb, const void *ptrv, unsigned long start, unsigned long len); void read_extent_buffer(struct extent_buffer *eb, void *dst, unsigned long start, unsigned long len); void write_extent_buffer(struct extent_buffer *eb, const void *src, unsigned long start, unsigned long len); void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src, unsigned long dst_offset, unsigned long src_offset, unsigned long len); void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, unsigned long src_offset, unsigned long len); void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, unsigned long src_offset, unsigned long len); void memset_extent_buffer(struct extent_buffer *eb, char c, unsigned long start, unsigned long len); int set_extent_buffer_dirty(struct extent_buffer *eb); int clear_extent_buffer_dirty(struct extent_buffer *eb); #endif partclone-0.2.51/src/btrfs/file-item.c000066400000000000000000000333661200565264100175300ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include #include #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "print-tree.h" #include "crc32c.h" #define MAX_CSUM_ITEMS(r,size) ((((BTRFS_LEAF_DATA_SIZE(r) - \ sizeof(struct btrfs_item) * 2) / \ size) - 1)) int btrfs_create_file(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 dirid, u64 *objectid) { return 0; } int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, u64 pos, u64 offset, u64 disk_num_bytes, u64 num_bytes) { int ret = 0; struct btrfs_file_extent_item *item; struct btrfs_key file_key; struct btrfs_path *path; struct extent_buffer *leaf; path = btrfs_alloc_path(); BUG_ON(!path); file_key.objectid = objectid; file_key.offset = pos; btrfs_set_key_type(&file_key, BTRFS_EXTENT_DATA_KEY); ret = btrfs_insert_empty_item(trans, root, path, &file_key, sizeof(*item)); if (ret < 0) goto out; BUG_ON(ret); leaf = path->nodes[0]; item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_file_extent_item); btrfs_set_file_extent_disk_bytenr(leaf, item, offset); btrfs_set_file_extent_disk_num_bytes(leaf, item, disk_num_bytes); btrfs_set_file_extent_offset(leaf, item, 0); btrfs_set_file_extent_num_bytes(leaf, item, num_bytes); btrfs_set_file_extent_ram_bytes(leaf, item, num_bytes); btrfs_set_file_extent_generation(leaf, item, trans->transid); btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG); btrfs_set_file_extent_compression(leaf, item, 0); btrfs_set_file_extent_encryption(leaf, item, 0); btrfs_set_file_extent_other_encoding(leaf, item, 0); btrfs_mark_buffer_dirty(leaf); out: btrfs_free_path(path); return ret; } int btrfs_insert_inline_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, u64 offset, char *buffer, size_t size) { struct btrfs_key key; struct btrfs_path *path; struct extent_buffer *leaf; unsigned long ptr; struct btrfs_file_extent_item *ei; u32 datasize; int err = 0; int ret; path = btrfs_alloc_path(); if (!path) return -ENOMEM; key.objectid = objectid; key.offset = offset; btrfs_set_key_type(&key, BTRFS_EXTENT_DATA_KEY); datasize = btrfs_file_extent_calc_inline_size(size); ret = btrfs_insert_empty_item(trans, root, path, &key, datasize); if (ret) { err = ret; goto fail; } leaf = path->nodes[0]; ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_file_extent_item); btrfs_set_file_extent_generation(leaf, ei, trans->transid); btrfs_set_file_extent_type(leaf, ei, BTRFS_FILE_EXTENT_INLINE); btrfs_set_file_extent_ram_bytes(leaf, ei, size); btrfs_set_file_extent_compression(leaf, ei, 0); btrfs_set_file_extent_encryption(leaf, ei, 0); btrfs_set_file_extent_other_encoding(leaf, ei, 0); ptr = btrfs_file_extent_inline_start(ei) + offset - key.offset; write_extent_buffer(leaf, buffer, ptr, size); btrfs_mark_buffer_dirty(leaf); fail: btrfs_free_path(path); return err; } struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 bytenr, int cow) { int ret; struct btrfs_key file_key; struct btrfs_key found_key; struct btrfs_csum_item *item; struct extent_buffer *leaf; u64 csum_offset = 0; u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); int csums_in_item; file_key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; file_key.offset = bytenr; btrfs_set_key_type(&file_key, BTRFS_EXTENT_CSUM_KEY); ret = btrfs_search_slot(trans, root, &file_key, path, 0, cow); if (ret < 0) goto fail; leaf = path->nodes[0]; if (ret > 0) { ret = 1; if (path->slots[0] == 0) goto fail; path->slots[0]--; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); if (btrfs_key_type(&found_key) != BTRFS_EXTENT_CSUM_KEY) goto fail; csum_offset = (bytenr - found_key.offset) / root->sectorsize; csums_in_item = btrfs_item_size_nr(leaf, path->slots[0]); csums_in_item /= csum_size; if (csum_offset >= csums_in_item) { ret = -EFBIG; goto fail; } } item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); item = (struct btrfs_csum_item *)((unsigned char *)item + csum_offset * csum_size); return item; fail: if (ret > 0) ret = -ENOENT; return ERR_PTR(ret); } int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 objectid, u64 offset, int mod) { int ret; struct btrfs_key file_key; int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; file_key.objectid = objectid; file_key.offset = offset; btrfs_set_key_type(&file_key, BTRFS_EXTENT_DATA_KEY); ret = btrfs_search_slot(trans, root, &file_key, path, ins_len, cow); return ret; } int btrfs_csum_file_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 alloc_end, u64 bytenr, char *data, size_t len) { int ret; struct btrfs_key file_key; struct btrfs_key found_key; u64 next_offset = (u64)-1; int found_next = 0; struct btrfs_path *path; struct btrfs_csum_item *item; struct extent_buffer *leaf = NULL; u64 csum_offset; u32 csum_result = ~(u32)0; u32 nritems; u32 ins_size; u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); path = btrfs_alloc_path(); BUG_ON(!path); file_key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; file_key.offset = bytenr; file_key.type = BTRFS_EXTENT_CSUM_KEY; item = btrfs_lookup_csum(trans, root, path, bytenr, 1); if (!IS_ERR(item)) { leaf = path->nodes[0]; goto found; } ret = PTR_ERR(item); if (ret == -EFBIG) { u32 item_size; /* we found one, but it isn't big enough yet */ leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, path->slots[0]); if ((item_size / csum_size) >= MAX_CSUM_ITEMS(root, csum_size)) { /* already at max size, make a new one */ goto insert; } } else { int slot = path->slots[0] + 1; /* we didn't find a csum item, insert one */ nritems = btrfs_header_nritems(path->nodes[0]); if (path->slots[0] >= nritems - 1) { ret = btrfs_next_leaf(root, path); if (ret == 1) found_next = 1; if (ret != 0) goto insert; slot = 0; } btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || found_key.type != BTRFS_EXTENT_CSUM_KEY) { found_next = 1; goto insert; } next_offset = found_key.offset; found_next = 1; goto insert; } /* * at this point, we know the tree has an item, but it isn't big * enough yet to put our csum in. Grow it */ btrfs_release_path(root, path); ret = btrfs_search_slot(trans, root, &file_key, path, csum_size, 1); if (ret < 0) goto fail; if (ret == 0) { BUG(); } if (path->slots[0] == 0) { goto insert; } path->slots[0]--; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); csum_offset = (file_key.offset - found_key.offset) / root->sectorsize; if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || found_key.type != BTRFS_EXTENT_CSUM_KEY || csum_offset >= MAX_CSUM_ITEMS(root, csum_size)) { goto insert; } if (csum_offset >= btrfs_item_size_nr(leaf, path->slots[0]) / csum_size) { u32 diff = (csum_offset + 1) * csum_size; diff = diff - btrfs_item_size_nr(leaf, path->slots[0]); if (diff != csum_size) goto insert; ret = btrfs_extend_item(trans, root, path, diff); BUG_ON(ret); goto csum; } insert: btrfs_release_path(root, path); csum_offset = 0; if (found_next) { u64 tmp = min(alloc_end, next_offset); tmp -= file_key.offset; tmp /= root->sectorsize; tmp = max((u64)1, tmp); tmp = min(tmp, (u64)MAX_CSUM_ITEMS(root, csum_size)); ins_size = csum_size * tmp; } else { ins_size = csum_size; } ret = btrfs_insert_empty_item(trans, root, path, &file_key, ins_size); if (ret < 0) goto fail; if (ret != 0) { WARN_ON(1); goto fail; } csum: leaf = path->nodes[0]; item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); ret = 0; item = (struct btrfs_csum_item *)((unsigned char *)item + csum_offset * csum_size); found: csum_result = btrfs_csum_data(root, data, csum_result, len); btrfs_csum_final(csum_result, (char *)&csum_result); if (csum_result == 0) { printk("csum result is 0 for block %llu\n", (unsigned long long)bytenr); } write_extent_buffer(leaf, &csum_result, (unsigned long)item, csum_size); btrfs_mark_buffer_dirty(path->nodes[0]); fail: btrfs_release_path(root, path); btrfs_free_path(path); return ret; } /* * helper function for csum removal, this expects the * key to describe the csum pointed to by the path, and it expects * the csum to overlap the range [bytenr, len] * * The csum should not be entirely contained in the range and the * range should not be entirely contained in the csum. * * This calls btrfs_truncate_item with the correct args based on the * overlap, and fixes up the key as required. */ static noinline int truncate_one_csum(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *key, u64 bytenr, u64 len) { struct extent_buffer *leaf; u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); u64 csum_end; u64 end_byte = bytenr + len; u32 blocksize = root->sectorsize; int ret; leaf = path->nodes[0]; csum_end = btrfs_item_size_nr(leaf, path->slots[0]) / csum_size; csum_end *= root->sectorsize; csum_end += key->offset; if (key->offset < bytenr && csum_end <= end_byte) { /* * [ bytenr - len ] * [ ] * [csum ] * A simple truncate off the end of the item */ u32 new_size = (bytenr - key->offset) / blocksize; new_size *= csum_size; ret = btrfs_truncate_item(trans, root, path, new_size, 1); BUG_ON(ret); } else if (key->offset >= bytenr && csum_end > end_byte && end_byte > key->offset) { /* * [ bytenr - len ] * [ ] * [csum ] * we need to truncate from the beginning of the csum */ u32 new_size = (csum_end - end_byte) / blocksize; new_size *= csum_size; ret = btrfs_truncate_item(trans, root, path, new_size, 0); BUG_ON(ret); key->offset = end_byte; ret = btrfs_set_item_key_safe(trans, root, path, key); BUG_ON(ret); } else { BUG(); } return 0; } /* * deletes the csum items from the csum tree for a given * range of bytes. */ int btrfs_del_csums(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 len) { struct btrfs_path *path; struct btrfs_key key; u64 end_byte = bytenr + len; u64 csum_end; struct extent_buffer *leaf; int ret; u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); int blocksize = root->sectorsize; root = root->fs_info->csum_root; path = btrfs_alloc_path(); while (1) { key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; key.offset = end_byte - 1; key.type = BTRFS_EXTENT_CSUM_KEY; ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret > 0) { if (path->slots[0] == 0) goto out; path->slots[0]--; } leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || key.type != BTRFS_EXTENT_CSUM_KEY) { break; } if (key.offset >= end_byte) break; csum_end = btrfs_item_size_nr(leaf, path->slots[0]) / csum_size; csum_end *= blocksize; csum_end += key.offset; /* this csum ends before we start, we're done */ if (csum_end <= bytenr) break; /* delete the entire item, it is inside our range */ if (key.offset >= bytenr && csum_end <= end_byte) { ret = btrfs_del_item(trans, root, path); BUG_ON(ret); } else if (key.offset < bytenr && csum_end > end_byte) { unsigned long offset; unsigned long shift_len; unsigned long item_offset; /* * [ bytenr - len ] * [csum ] * * Our bytes are in the middle of the csum, * we need to split this item and insert a new one. * * But we can't drop the path because the * csum could change, get removed, extended etc. * * The trick here is the max size of a csum item leaves * enough room in the tree block for a single * item header. So, we split the item in place, * adding a new header pointing to the existing * bytes. Then we loop around again and we have * a nicely formed csum item that we can neatly * truncate. */ offset = (bytenr - key.offset) / blocksize; offset *= csum_size; shift_len = (len / blocksize) * csum_size; item_offset = btrfs_item_ptr_offset(leaf, path->slots[0]); memset_extent_buffer(leaf, 0, item_offset + offset, shift_len); key.offset = bytenr; /* * btrfs_split_item returns -EAGAIN when the * item changed size or key */ ret = btrfs_split_item(trans, root, path, &key, offset); BUG_ON(ret && ret != -EAGAIN); key.offset = end_byte - 1; } else { ret = truncate_one_csum(trans, root, path, &key, bytenr, len); BUG_ON(ret); } btrfs_release_path(root, path); } out: btrfs_free_path(path); return 0; } partclone-0.2.51/src/btrfs/hash.h000066400000000000000000000015501200565264100165730ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __HASH__ #define __HASH__ #include "crc32c.h" static inline u64 btrfs_name_hash(const char *name, int len) { return crc32c((u32)~1, name, len); } #endif partclone-0.2.51/src/btrfs/inode-item.c000066400000000000000000000137071200565264100177040ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include "ctree.h" #include "disk-io.h" #include "transaction.h" int find_name_in_backref(struct btrfs_path *path, const char * name, int name_len, struct btrfs_inode_ref **ref_ret) { struct extent_buffer *leaf; struct btrfs_inode_ref *ref; unsigned long ptr; unsigned long name_ptr; u32 item_size; u32 cur_offset = 0; int len; leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, path->slots[0]); ptr = btrfs_item_ptr_offset(leaf, path->slots[0]); while (cur_offset < item_size) { ref = (struct btrfs_inode_ref *)(ptr + cur_offset); len = btrfs_inode_ref_name_len(leaf, ref); name_ptr = (unsigned long)(ref + 1); cur_offset += len + sizeof(*ref); if (len != name_len) continue; if (memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0) { *ref_ret = ref; return 1; } } return 0; } int btrfs_del_inode_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 inode_objectid, u64 ref_objectid) { struct btrfs_path *path; struct btrfs_key key; struct btrfs_inode_ref *ref; struct extent_buffer *leaf; unsigned long ptr; unsigned long item_start; u32 item_size; u32 sub_item_len; int ret; int del_len = name_len + sizeof(*ref); key.objectid = inode_objectid; key.offset = ref_objectid; btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY); path = btrfs_alloc_path(); if (!path) return -ENOMEM; ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret > 0) { ret = -ENOENT; goto out; } else if (ret < 0) { goto out; } if (!find_name_in_backref(path, name, name_len, &ref)) { ret = -ENOENT; goto out; } leaf = path->nodes[0]; item_size = btrfs_item_size_nr(leaf, path->slots[0]); if (del_len == item_size) { ret = btrfs_del_item(trans, root, path); goto out; } ptr = (unsigned long)ref; sub_item_len = name_len + sizeof(*ref); item_start = btrfs_item_ptr_offset(leaf, path->slots[0]); memmove_extent_buffer(leaf, ptr, ptr + sub_item_len, item_size - (ptr + sub_item_len - item_start)); ret = btrfs_truncate_item(trans, root, path, item_size - sub_item_len, 1); BUG_ON(ret); out: btrfs_free_path(path); return ret; } int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, const char *name, int name_len, u64 inode_objectid, u64 ref_objectid, u64 index) { struct btrfs_path *path; struct btrfs_key key; struct btrfs_inode_ref *ref; unsigned long ptr; int ret; int ins_len = name_len + sizeof(*ref); key.objectid = inode_objectid; key.offset = ref_objectid; btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY); path = btrfs_alloc_path(); if (!path) return -ENOMEM; ret = btrfs_insert_empty_item(trans, root, path, &key, ins_len); if (ret == -EEXIST) { u32 old_size; if (find_name_in_backref(path, name, name_len, &ref)) goto out; old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]); ret = btrfs_extend_item(trans, root, path, ins_len); BUG_ON(ret); ref = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_inode_ref); ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size); btrfs_set_inode_ref_name_len(path->nodes[0], ref, name_len); btrfs_set_inode_ref_index(path->nodes[0], ref, index); ptr = (unsigned long)(ref + 1); ret = 0; } else if (ret < 0) { goto out; } else { ref = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_inode_ref); btrfs_set_inode_ref_name_len(path->nodes[0], ref, name_len); btrfs_set_inode_ref_index(path->nodes[0], ref, index); ptr = (unsigned long)(ref + 1); } write_extent_buffer(path->nodes[0], name, ptr, name_len); btrfs_mark_buffer_dirty(path->nodes[0]); out: btrfs_free_path(path); return ret; } int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 objectid) { struct btrfs_key key; int ret; key.objectid = objectid; btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY); key.offset = 0; ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(struct btrfs_inode_item)); if (ret == 0 && objectid > root->highest_inode) root->highest_inode = objectid; return ret; } int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *location, int mod) { int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; int ret; int slot; struct extent_buffer *leaf; struct btrfs_key found_key; ret = btrfs_search_slot(trans, root, location, path, ins_len, cow); if (ret > 0 && btrfs_key_type(location) == BTRFS_ROOT_ITEM_KEY && location->offset == (u64)-1 && path->slots[0] != 0) { slot = path->slots[0] - 1; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, slot); if (found_key.objectid == location->objectid && btrfs_key_type(&found_key) == btrfs_key_type(location)) { path->slots[0]--; return 0; } } return ret; } int btrfs_insert_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, struct btrfs_inode_item *inode_item) { int ret; struct btrfs_key key; key.objectid = objectid; key.type = BTRFS_INODE_ITEM_KEY; key.offset = 0; ret = btrfs_insert_item(trans, root, &key, inode_item, sizeof(*inode_item)); return ret; } partclone-0.2.51/src/btrfs/inode-map.c000066400000000000000000000062341200565264100175200ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include "ctree.h" #include "disk-io.h" #include "transaction.h" int btrfs_find_highest_inode(struct btrfs_root *root, u64 *objectid) { struct btrfs_path *path; int ret; struct extent_buffer *l; struct btrfs_key search_key; struct btrfs_key found_key; int slot; path = btrfs_alloc_path(); BUG_ON(!path); search_key.objectid = (u64)-1; search_key.offset = (u64)-1; ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0); if (ret < 0) goto error; BUG_ON(ret == 0); if (path->slots[0] > 0) { slot = path->slots[0] - 1; l = path->nodes[0]; btrfs_item_key_to_cpu(l, &found_key, slot); *objectid = found_key.objectid; } else { *objectid = BTRFS_FIRST_FREE_OBJECTID; } ret = 0; error: btrfs_free_path(path); return ret; } /* * walks the btree of allocated inodes and find a hole. */ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 dirid, u64 *objectid) { struct btrfs_path *path; struct btrfs_key key; int ret; int slot = 0; u64 last_ino = 0; int start_found; struct extent_buffer *l; struct btrfs_key search_key; u64 search_start = dirid; path = btrfs_alloc_path(); BUG_ON(!path); search_start = root->last_inode_alloc; search_start = max((unsigned long long)search_start, BTRFS_FIRST_FREE_OBJECTID); search_key.objectid = search_start; search_key.offset = 0; btrfs_init_path(path); start_found = 0; ret = btrfs_search_slot(trans, root, &search_key, path, 0, 0); if (ret < 0) goto error; if (path->slots[0] > 0) path->slots[0]--; while (1) { l = path->nodes[0]; slot = path->slots[0]; if (slot >= btrfs_header_nritems(l)) { ret = btrfs_next_leaf(root, path); if (ret == 0) continue; if (ret < 0) goto error; if (!start_found) { *objectid = search_start; start_found = 1; goto found; } *objectid = last_ino > search_start ? last_ino : search_start; goto found; } btrfs_item_key_to_cpu(l, &key, slot); if (key.objectid >= search_start) { if (start_found) { if (last_ino < search_start) last_ino = search_start; if (key.objectid > last_ino) { *objectid = last_ino; goto found; } } } start_found = 1; last_ino = key.objectid + 1; path->slots[0]++; } // FIXME -ENOSPC found: root->last_inode_alloc = *objectid; btrfs_release_path(root, path); btrfs_free_path(path); BUG_ON(*objectid < search_start); return 0; error: btrfs_release_path(root, path); btrfs_free_path(path); return ret; } partclone-0.2.51/src/btrfs/ioctl.h000066400000000000000000000041021200565264100167560ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __IOCTL_ #define __IOCTL_ #include #include #define BTRFS_IOCTL_MAGIC 0x94 #define BTRFS_VOL_NAME_MAX 255 #define BTRFS_PATH_NAME_MAX 4087 struct btrfs_ioctl_vol_args { __s64 fd; char name[BTRFS_PATH_NAME_MAX + 1]; }; #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ struct btrfs_ioctl_vol_args) #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \ struct btrfs_ioctl_vol_args) #define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \ struct btrfs_ioctl_vol_args) #define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \ struct btrfs_ioctl_vol_args) /* trans start and trans end are dangerous, and only for * use by applications that know how to avoid the * resulting deadlocks */ #define BTRFS_IOC_TRANS_START _IO(BTRFS_IOCTL_MAGIC, 6) #define BTRFS_IOC_TRANS_END _IO(BTRFS_IOCTL_MAGIC, 7) #define BTRFS_IOC_SYNC _IO(BTRFS_IOCTL_MAGIC, 8) #define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int) #define BTRFS_IOC_ADD_DEV _IOW(BTRFS_IOCTL_MAGIC, 10, \ struct btrfs_ioctl_vol_args) #define BTRFS_IOC_RM_DEV _IOW(BTRFS_IOCTL_MAGIC, 11, \ struct btrfs_ioctl_vol_args) #define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \ struct btrfs_ioctl_vol_args) /* 13 is for CLONE_RANGE */ #define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \ struct btrfs_ioctl_vol_args) #endif partclone-0.2.51/src/btrfs/kerncompat.h000066400000000000000000000141001200565264100200060ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __KERNCOMPAT #define __KERNCOMPAT #include #include #include #include #include #include #include #ifndef READ #define READ 0 #define WRITE 1 #define READA 2 #endif #define gfp_t int #define get_cpu_var(p) (p) #define __get_cpu_var(p) (p) #define BITS_PER_LONG (sizeof(long) * 8) #define __GFP_BITS_SHIFT 20 #define __GFP_BITS_MASK ((int)((1 << __GFP_BITS_SHIFT) - 1)) #define GFP_KERNEL 0 #define GFP_NOFS 0 #define __read_mostly #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define ULONG_MAX (~0UL) #define BUG() abort() #ifdef __CHECKER__ #define __force __attribute__((force)) #define __bitwise__ __attribute__((bitwise)) #else #define __force #define __bitwise__ #endif #ifndef __CHECKER__ #include typedef __u32 u32; typedef __u64 u64; typedef __u16 u16; typedef __u8 u8; #else typedef unsigned int u32; typedef unsigned int __u32; typedef unsigned long long u64; typedef unsigned char u8; typedef unsigned short u16; #endif struct vma_shared { int prio_tree_node; }; struct vm_area_struct { unsigned long vm_pgoff; unsigned long vm_start; unsigned long vm_end; struct vma_shared shared; }; struct page { unsigned long index; }; struct mutex { unsigned long lock; }; #define mutex_init(m) \ do { \ (m)->lock = 1; \ } while (0) static inline void mutex_lock(struct mutex *m) { m->lock--; } static inline void mutex_unlock(struct mutex *m) { m->lock++; } static inline int mutex_is_locked(struct mutex *m) { return (m->lock != 1); } #define cond_resched() do { } while (0) #define preempt_enable() do { } while (0) #define preempt_disable() do { } while (0) #define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) /** * __set_bit - Set a bit in memory * @nr: the bit to set * @addr: the address to start counting from * * Unlike set_bit(), this function is non-atomic and may be reordered. * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ static inline void __set_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BITOP_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); *p |= mask; } static inline void __clear_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BITOP_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr); *p &= ~mask; } /** * test_bit - Determine whether a bit is set * @nr: bit number to test * @addr: Address to start counting from */ static inline int test_bit(int nr, const volatile unsigned long *addr) { return 1UL & (addr[BITOP_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); } /* * error pointer */ #define MAX_ERRNO 4095 #define IS_ERR_VALUE(x) ((x) >= (unsigned long)-MAX_ERRNO) static inline void *ERR_PTR(long error) { return (void *) error; } static inline long PTR_ERR(const void *ptr) { return (long) ptr; } static inline long IS_ERR(const void *ptr) { return IS_ERR_VALUE((unsigned long)ptr); } /* * max/min macro */ #define min(x,y) ({ \ typeof(x) _x = (x); \ typeof(y) _y = (y); \ (void) (&_x == &_y); \ _x < _y ? _x : _y; }) #define max(x,y) ({ \ typeof(x) _x = (x); \ typeof(y) _y = (y); \ (void) (&_x == &_y); \ _x > _y ? _x : _y; }) #define min_t(type,x,y) \ ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) #define max_t(type,x,y) \ ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) /* * printk */ #define printk(fmt, args...) fprintf(stderr, fmt, ##args) #define KERN_CRIT "" #define KERN_ERR "" /* * kmalloc/kfree */ #define kmalloc(x, y) malloc(x) #define kzalloc(x, y) calloc(1, x) #define kstrdup(x, y) strdup(x) #define kfree(x) free(x) #define BUG_ON(c) assert(!(c)) #define WARN_ON(c) assert(!(c)) #undef offsetof #ifdef __compiler_offsetof #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) #else #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) #ifdef __CHECKER__ #define __CHECK_ENDIAN__ #define __bitwise __bitwise__ #else #define __bitwise #endif typedef u16 __bitwise __le16; typedef u16 __bitwise __be16; typedef u32 __bitwise __le32; typedef u32 __bitwise __be32; typedef u64 __bitwise __le64; typedef u64 __bitwise __be64; /* Macros to generate set/get funcs for the struct fields * assume there is a lefoo_to_cpu for every type, so lets make a simple * one for u8: */ #define le8_to_cpu(v) (v) #define cpu_to_le8(v) (v) #define __le8 u8 #if __BYTE_ORDER == __BIG_ENDIAN #define cpu_to_le64(x) ((__force __le64)(u64)(bswap_64(x))) #define le64_to_cpu(x) ((__force u64)(__le64)(bswap_64(x))) #define cpu_to_le32(x) ((__force __le32)(u32)(bswap_32(x))) #define le32_to_cpu(x) ((__force u32)(__le32)(bswap_32(x))) #define cpu_to_le16(x) ((__force __le16)(u16)(bswap_16(x))) #define le16_to_cpu(x) ((__force u16)(__le16)(bswap_16(x))) #else #define cpu_to_le64(x) ((__force __le64)(u64)(x)) #define le64_to_cpu(x) ((__force u64)(__le64)(x)) #define cpu_to_le32(x) ((__force __le32)(u32)(x)) #define le32_to_cpu(x) ((__force u32)(__le32)(x)) #define cpu_to_le16(x) ((__force __le16)(u16)(x)) #define le16_to_cpu(x) ((__force u16)(__le16)(x)) #endif #endif #ifndef noinline #define noinline #endif partclone-0.2.51/src/btrfs/list.h000066400000000000000000000315341200565264100166300ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef _LINUX_LIST_H #define _LINUX_LIST_H #define LIST_POISON1 ((void *) 0x00100100) #define LIST_POISON2 ((void *) 0x00200200) /* * Simple doubly linked list implementation. * * Some of the internal functions ("__xxx") are useful when * manipulating whole lists rather than single entries, as * sometimes we already know the next/prev entries and we can * generate better code by using them directly rather than * using the generic single-entry routines. */ struct list_head { struct list_head *next, *prev; }; #define LIST_HEAD_INIT(name) { &(name), &(name) } #define LIST_HEAD(name) \ struct list_head name = LIST_HEAD_INIT(name) static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; list->prev = list; } /* * Insert a new entry between two known consecutive entries. * * This is only for internal list manipulation where we know * the prev/next entries already! */ #ifndef CONFIG_DEBUG_LIST static inline void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { next->prev = new; new->next = next; new->prev = prev; prev->next = new; } #else extern void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next); #endif /** * list_add - add a new entry * @new: new entry to be added * @head: list head to add it after * * Insert a new entry after the specified head. * This is good for implementing stacks. */ #ifndef CONFIG_DEBUG_LIST static inline void list_add(struct list_head *new, struct list_head *head) { __list_add(new, head, head->next); } #else extern void list_add(struct list_head *new, struct list_head *head); #endif /** * list_add_tail - add a new entry * @new: new entry to be added * @head: list head to add it before * * Insert a new entry before the specified head. * This is useful for implementing queues. */ static inline void list_add_tail(struct list_head *new, struct list_head *head) { __list_add(new, head->prev, head); } /* * Delete a list entry by making the prev/next entries * point to each other. * * This is only for internal list manipulation where we know * the prev/next entries already! */ static inline void __list_del(struct list_head * prev, struct list_head * next) { next->prev = prev; prev->next = next; } /** * list_del - deletes entry from list. * @entry: the element to delete from the list. * Note: list_empty on entry does not return true after this, the entry is * in an undefined state. */ #ifndef CONFIG_DEBUG_LIST static inline void list_del(struct list_head *entry) { __list_del(entry->prev, entry->next); entry->next = LIST_POISON1; entry->prev = LIST_POISON2; } #else extern void list_del(struct list_head *entry); #endif /** * list_replace - replace old entry by new one * @old : the element to be replaced * @new : the new element to insert * Note: if 'old' was empty, it will be overwritten. */ static inline void list_replace(struct list_head *old, struct list_head *new) { new->next = old->next; new->next->prev = new; new->prev = old->prev; new->prev->next = new; } static inline void list_replace_init(struct list_head *old, struct list_head *new) { list_replace(old, new); INIT_LIST_HEAD(old); } /** * list_del_init - deletes entry from list and reinitialize it. * @entry: the element to delete from the list. */ static inline void list_del_init(struct list_head *entry) { __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); } /** * list_move - delete from one list and add as another's head * @list: the entry to move * @head: the head that will precede our entry */ static inline void list_move(struct list_head *list, struct list_head *head) { __list_del(list->prev, list->next); list_add(list, head); } /** * list_move_tail - delete from one list and add as another's tail * @list: the entry to move * @head: the head that will follow our entry */ static inline void list_move_tail(struct list_head *list, struct list_head *head) { __list_del(list->prev, list->next); list_add_tail(list, head); } /** * list_is_last - tests whether @list is the last entry in list @head * @list: the entry to test * @head: the head of the list */ static inline int list_is_last(const struct list_head *list, const struct list_head *head) { return list->next == head; } /** * list_empty - tests whether a list is empty * @head: the list to test. */ static inline int list_empty(const struct list_head *head) { return head->next == head; } /** * list_empty_careful - tests whether a list is empty and not being modified * @head: the list to test * * Description: * tests whether a list is empty _and_ checks that no other CPU might be * in the process of modifying either member (next or prev) * * NOTE: using list_empty_careful() without synchronization * can only be safe if the only activity that can happen * to the list entry is list_del_init(). Eg. it cannot be used * if another CPU could re-list_add() it. */ static inline int list_empty_careful(const struct list_head *head) { struct list_head *next = head->next; return (next == head) && (next == head->prev); } static inline void __list_splice(struct list_head *list, struct list_head *head) { struct list_head *first = list->next; struct list_head *last = list->prev; struct list_head *at = head->next; first->prev = head; head->next = first; last->next = at; at->prev = last; } /** * list_splice - join two lists * @list: the new list to add. * @head: the place to add it in the first list. */ static inline void list_splice(struct list_head *list, struct list_head *head) { if (!list_empty(list)) __list_splice(list, head); } /** * list_splice_init - join two lists and reinitialise the emptied list. * @list: the new list to add. * @head: the place to add it in the first list. * * The list at @list is reinitialised */ static inline void list_splice_init(struct list_head *list, struct list_head *head) { if (!list_empty(list)) { __list_splice(list, head); INIT_LIST_HEAD(list); } } /** * list_entry - get the struct for this entry * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. * @member: the name of the list_struct within the struct. */ #define list_entry(ptr, type, member) \ container_of(ptr, type, member) /** * list_for_each - iterate over a list * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list. */ #define list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); \ pos = pos->next) /** * __list_for_each - iterate over a list * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list. * * This variant differs from list_for_each() in that it's the * simplest possible list iteration code, no prefetching is done. * Use this for code that knows the list to be very short (empty * or 1 entry) most of the time. */ #define __list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); pos = pos->next) /** * list_for_each_prev - iterate over a list backwards * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list. */ #define list_for_each_prev(pos, head) \ for (pos = (head)->prev; pos != (head); \ pos = pos->prev) /** * list_for_each_safe - iterate over a list safe against removal of list entry * @pos: the &struct list_head to use as a loop cursor. * @n: another &struct list_head to use as temporary storage * @head: the head for your list. */ #define list_for_each_safe(pos, n, head) \ for (pos = (head)->next, n = pos->next; pos != (head); \ pos = n, n = pos->next) /** * list_for_each_entry - iterate over list of given type * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. */ #define list_for_each_entry(pos, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) /** * list_for_each_entry_reverse - iterate backwards over list of given type. * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. */ #define list_for_each_entry_reverse(pos, head, member) \ for (pos = list_entry((head)->prev, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.prev, typeof(*pos), member)) /** * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue * @pos: the type * to use as a start point * @head: the head of the list * @member: the name of the list_struct within the struct. * * Prepares a pos entry for use as a start point in list_for_each_entry_continue. */ #define list_prepare_entry(pos, head, member) \ ((pos) ? : list_entry(head, typeof(*pos), member)) /** * list_for_each_entry_continue - continue iteration over list of given type * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Continue to iterate over list of given type, continuing after * the current position. */ #define list_for_each_entry_continue(pos, head, member) \ for (pos = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) /** * list_for_each_entry_from - iterate over list of given type from the current point * @pos: the type * to use as a loop cursor. * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate over list of given type, continuing from current position. */ #define list_for_each_entry_from(pos, head, member) \ for (; &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. */ #define list_for_each_entry_safe(pos, n, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member), \ n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** * list_for_each_entry_safe_continue * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate over list of given type, continuing after current point, * safe against removal of list entry. */ #define list_for_each_entry_safe_continue(pos, n, head, member) \ for (pos = list_entry(pos->member.next, typeof(*pos), member), \ n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** * list_for_each_entry_safe_from * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate over list of given type from current point, safe against * removal of list entry. */ #define list_for_each_entry_safe_from(pos, n, head, member) \ for (n = list_entry(pos->member.next, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** * list_for_each_entry_safe_reverse * @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. * * Iterate backwards over list of given type, safe against removal * of list entry. */ #define list_for_each_entry_safe_reverse(pos, n, head, member) \ for (pos = list_entry((head)->prev, typeof(*pos), member), \ n = list_entry(pos->member.prev, typeof(*pos), member); \ &pos->member != (head); \ pos = n, n = list_entry(n->member.prev, typeof(*n), member)) #endif partclone-0.2.51/src/btrfs/print-tree.c000066400000000000000000000474451200565264100177510ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include #include #include #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" static int print_dir_item(struct extent_buffer *eb, struct btrfs_item *item, struct btrfs_dir_item *di) { u32 total; u32 cur = 0; u32 len; u32 name_len; u32 data_len; char namebuf[BTRFS_NAME_LEN]; struct btrfs_disk_key location; total = btrfs_item_size(eb, item); while(cur < total) { btrfs_dir_item_key(eb, di, &location); printf("\t\tlocation "); btrfs_print_key(&location); printf(" type %u\n", btrfs_dir_type(eb, di)); name_len = btrfs_dir_name_len(eb, di); data_len = btrfs_dir_data_len(eb, di); len = (name_len <= sizeof(namebuf))? name_len: sizeof(namebuf); read_extent_buffer(eb, namebuf, (unsigned long)(di + 1), len); printf("\t\tnamelen %u datalen %u name: %.*s\n", name_len, data_len, len, namebuf); len = sizeof(*di) + name_len + data_len; di = (struct btrfs_dir_item *)((char *)di + len); cur += len; } return 0; } static int print_inode_ref_item(struct extent_buffer *eb, struct btrfs_item *item, struct btrfs_inode_ref *ref) { u32 total; u32 cur = 0; u32 len; u32 name_len; u64 index; char namebuf[BTRFS_NAME_LEN]; total = btrfs_item_size(eb, item); while(cur < total) { name_len = btrfs_inode_ref_name_len(eb, ref); index = btrfs_inode_ref_index(eb, ref); len = (name_len <= sizeof(namebuf))? name_len: sizeof(namebuf); read_extent_buffer(eb, namebuf, (unsigned long)(ref + 1), len); printf("\t\tinode ref index %llu namelen %u name: %.*s\n", (unsigned long long)index, name_len, len, namebuf); len = sizeof(*ref) + name_len; ref = (struct btrfs_inode_ref *)((char *)ref + len); cur += len; } return 0; } static void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk) { int num_stripes = btrfs_chunk_num_stripes(eb, chunk); int i; printf("\t\tchunk length %llu owner %llu type %llu num_stripes %d\n", (unsigned long long)btrfs_chunk_length(eb, chunk), (unsigned long long)btrfs_chunk_owner(eb, chunk), (unsigned long long)btrfs_chunk_type(eb, chunk), num_stripes); for (i = 0 ; i < num_stripes ; i++) { printf("\t\t\tstripe %d devid %llu offset %llu\n", i, (unsigned long long)btrfs_stripe_devid_nr(eb, chunk, i), (unsigned long long)btrfs_stripe_offset_nr(eb, chunk, i)); } } static void print_dev_item(struct extent_buffer *eb, struct btrfs_dev_item *dev_item) { printf("\t\tdev item devid %llu " "total_bytes %llu bytes used %Lu\n", (unsigned long long)btrfs_device_id(eb, dev_item), (unsigned long long)btrfs_device_total_bytes(eb, dev_item), (unsigned long long)btrfs_device_bytes_used(eb, dev_item)); } static void print_uuids(struct extent_buffer *eb) { char fs_uuid[37]; char chunk_uuid[37]; u8 disk_uuid[BTRFS_UUID_SIZE]; read_extent_buffer(eb, disk_uuid, (unsigned long)btrfs_header_fsid(eb), BTRFS_FSID_SIZE); fs_uuid[36] = '\0'; uuid_unparse(disk_uuid, fs_uuid); read_extent_buffer(eb, disk_uuid, (unsigned long)btrfs_header_chunk_tree_uuid(eb), BTRFS_UUID_SIZE); chunk_uuid[36] = '\0'; uuid_unparse(disk_uuid, chunk_uuid); printf("fs uuid %s\nchunk uuid %s\n", fs_uuid, chunk_uuid); } static void print_file_extent_item(struct extent_buffer *eb, struct btrfs_item *item, struct btrfs_file_extent_item *fi) { int extent_type = btrfs_file_extent_type(eb, fi); if (extent_type == BTRFS_FILE_EXTENT_INLINE) { printf("\t\tinline extent data size %u " "ram %u compress %d\n", btrfs_file_extent_inline_item_len(eb, item), btrfs_file_extent_inline_len(eb, fi), btrfs_file_extent_compression(eb, fi)); return; } if (extent_type == BTRFS_FILE_EXTENT_PREALLOC) { printf("\t\tprealloc data disk byte %llu nr %llu\n", (unsigned long long)btrfs_file_extent_disk_bytenr(eb, fi), (unsigned long long)btrfs_file_extent_disk_num_bytes(eb, fi)); printf("\t\tprealloc data offset %llu nr %llu\n", (unsigned long long)btrfs_file_extent_offset(eb, fi), (unsigned long long)btrfs_file_extent_num_bytes(eb, fi)); return; } printf("\t\textent data disk byte %llu nr %llu\n", (unsigned long long)btrfs_file_extent_disk_bytenr(eb, fi), (unsigned long long)btrfs_file_extent_disk_num_bytes(eb, fi)); printf("\t\textent data offset %llu nr %llu ram %llu\n", (unsigned long long)btrfs_file_extent_offset(eb, fi), (unsigned long long)btrfs_file_extent_num_bytes(eb, fi), (unsigned long long)btrfs_file_extent_ram_bytes(eb, fi)); printf("\t\textent compression %d\n", btrfs_file_extent_compression(eb, fi)); } static void print_extent_item(struct extent_buffer *eb, int slot) { struct btrfs_extent_item *ei; struct btrfs_extent_inline_ref *iref; struct btrfs_extent_data_ref *dref; struct btrfs_shared_data_ref *sref; struct btrfs_disk_key key; unsigned long end; unsigned long ptr; int type; u32 item_size = btrfs_item_size_nr(eb, slot); u64 flags; u64 offset; if (item_size < sizeof(*ei)) { #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 struct btrfs_extent_item_v0 *ei0; BUG_ON(item_size != sizeof(*ei0)); ei0 = btrfs_item_ptr(eb, slot, struct btrfs_extent_item_v0); printf("\t\textent refs %u\n", btrfs_extent_refs_v0(eb, ei0)); return; #else BUG(); #endif } ei = btrfs_item_ptr(eb, slot, struct btrfs_extent_item); flags = btrfs_extent_flags(eb, ei); printf("\t\textent refs %llu gen %llu flags %llu\n", (unsigned long long)btrfs_extent_refs(eb, ei), (unsigned long long)btrfs_extent_generation(eb, ei), (unsigned long long)flags); if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) { struct btrfs_tree_block_info *info; info = (struct btrfs_tree_block_info *)(ei + 1); btrfs_tree_block_key(eb, info, &key); printf("\t\ttree block key (%llu %x %llu) level %d\n", (unsigned long long)btrfs_disk_key_objectid(&key), key.type, (unsigned long long)btrfs_disk_key_offset(&key), btrfs_tree_block_level(eb, info)); iref = (struct btrfs_extent_inline_ref *)(info + 1); } else { iref = (struct btrfs_extent_inline_ref *)(ei + 1); } ptr = (unsigned long)iref; end = (unsigned long)ei + item_size; while (ptr < end) { iref = (struct btrfs_extent_inline_ref *)ptr; type = btrfs_extent_inline_ref_type(eb, iref); offset = btrfs_extent_inline_ref_offset(eb, iref); switch (type) { case BTRFS_TREE_BLOCK_REF_KEY: printf("\t\ttree block backref root %llu\n", (unsigned long long)offset); break; case BTRFS_SHARED_BLOCK_REF_KEY: printf("\t\tshared block backref parent %llu\n", (unsigned long long)offset); break; case BTRFS_EXTENT_DATA_REF_KEY: dref = (struct btrfs_extent_data_ref *)(&iref->offset); printf("\t\textent data backref root %llu " "objectid %llu offset %llu count %u\n", (unsigned long long)btrfs_extent_data_ref_root(eb, dref), (unsigned long long)btrfs_extent_data_ref_objectid(eb, dref), (unsigned long long)btrfs_extent_data_ref_offset(eb, dref), btrfs_extent_data_ref_count(eb, dref)); break; case BTRFS_SHARED_DATA_REF_KEY: sref = (struct btrfs_shared_data_ref *)(iref + 1); printf("\t\tshared data backref parent %llu count %u\n", (unsigned long long)offset, btrfs_shared_data_ref_count(eb, sref)); break; default: BUG(); } ptr += btrfs_extent_inline_ref_size(type); } WARN_ON(ptr > end); } #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 static void print_extent_ref_v0(struct extent_buffer *eb, int slot) { struct btrfs_extent_ref_v0 *ref0; ref0 = btrfs_item_ptr(eb, slot, struct btrfs_extent_ref_v0); printf("\t\textent back ref root %llu gen %llu " "owner %llu num_refs %lu\n", (unsigned long long)btrfs_ref_root_v0(eb, ref0), (unsigned long long)btrfs_ref_generation_v0(eb, ref0), (unsigned long long)btrfs_ref_objectid_v0(eb, ref0), (unsigned long)btrfs_ref_count_v0(eb, ref0)); } #endif static void print_root_ref(struct extent_buffer *leaf, int slot, char *tag) { struct btrfs_root_ref *ref; char namebuf[BTRFS_NAME_LEN]; int namelen; ref = btrfs_item_ptr(leaf, slot, struct btrfs_root_ref); namelen = btrfs_root_ref_name_len(leaf, ref); read_extent_buffer(leaf, namebuf, (unsigned long)(ref + 1), namelen); printf("\t\troot %s key dirid %llu sequence %llu name %.*s\n", tag, (unsigned long long)btrfs_root_ref_dirid(leaf, ref), (unsigned long long)btrfs_root_ref_sequence(leaf, ref), namelen, namebuf); } static void print_key_type(u8 type) { switch (type) { case BTRFS_INODE_ITEM_KEY: printf("INODE_ITEM"); break; case BTRFS_INODE_REF_KEY: printf("INODE_REF"); break; case BTRFS_DIR_ITEM_KEY: printf("DIR_ITEM"); break; case BTRFS_DIR_INDEX_KEY: printf("DIR_INDEX"); break; case BTRFS_DIR_LOG_ITEM_KEY: printf("DIR_LOG_ITEM"); break; case BTRFS_DIR_LOG_INDEX_KEY: printf("DIR_LOG_INDEX"); break; case BTRFS_XATTR_ITEM_KEY: printf("XATTR_ITEM"); break; case BTRFS_ORPHAN_ITEM_KEY: printf("ORPHAN_ITEM"); break; case BTRFS_ROOT_ITEM_KEY: printf("ROOT_ITEM"); break; case BTRFS_ROOT_REF_KEY: printf("ROOT_REF"); break; case BTRFS_ROOT_BACKREF_KEY: printf("ROOT_BACKREF"); break; case BTRFS_EXTENT_ITEM_KEY: printf("EXTENT_ITEM"); break; case BTRFS_TREE_BLOCK_REF_KEY: printf("TREE_BLOCK_REF"); break; case BTRFS_SHARED_BLOCK_REF_KEY: printf("SHARED_BLOCK_REF"); break; case BTRFS_EXTENT_DATA_REF_KEY: printf("EXTENT_DATA_REF"); break; case BTRFS_SHARED_DATA_REF_KEY: printf("SHARED_DATA_REF"); break; case BTRFS_EXTENT_REF_V0_KEY: printf("EXTENT_REF_V0"); break; case BTRFS_CSUM_ITEM_KEY: printf("CSUM_ITEM"); break; case BTRFS_EXTENT_CSUM_KEY: printf("EXTENT_CSUM"); break; case BTRFS_EXTENT_DATA_KEY: printf("EXTENT_DATA"); break; case BTRFS_BLOCK_GROUP_ITEM_KEY: printf("BLOCK_GROUP_ITEM"); break; case BTRFS_CHUNK_ITEM_KEY: printf("CHUNK_ITEM"); break; case BTRFS_DEV_ITEM_KEY: printf("DEV_ITEM"); break; case BTRFS_DEV_EXTENT_KEY: printf("DEV_EXTENT"); break; case BTRFS_STRING_ITEM_KEY: printf("STRING_ITEM"); break; default: printf("UNKNOWN"); }; } static void print_objectid(unsigned long long objectid, u8 type) { if (type == BTRFS_DEV_EXTENT_KEY) { printf("%llu", objectid); /* device id */ return; } switch (objectid) { case BTRFS_ROOT_TREE_OBJECTID: if (type == BTRFS_DEV_ITEM_KEY) printf("DEV_ITEMS"); else printf("ROOT_TREE"); break; case BTRFS_EXTENT_TREE_OBJECTID: printf("EXTENT_TREE"); break; case BTRFS_CHUNK_TREE_OBJECTID: printf("CHUNK_TREE"); break; case BTRFS_DEV_TREE_OBJECTID: printf("DEV_TREE"); break; case BTRFS_FS_TREE_OBJECTID: printf("FS_TREE"); break; case BTRFS_ROOT_TREE_DIR_OBJECTID: printf("ROOT_TREE_DIR"); break; case BTRFS_CSUM_TREE_OBJECTID: printf("CSUM_TREE"); break; case BTRFS_ORPHAN_OBJECTID: printf("ORPHAN"); break; case BTRFS_TREE_LOG_OBJECTID: printf("TREE_LOG"); break; case BTRFS_TREE_LOG_FIXUP_OBJECTID: printf("LOG_FIXUP"); break; case BTRFS_TREE_RELOC_OBJECTID: printf("TREE_RELOC"); break; case BTRFS_DATA_RELOC_TREE_OBJECTID: printf("DATA_RELOC_TREE"); break; case BTRFS_EXTENT_CSUM_OBJECTID: printf("EXTENT_CSUM"); break; case BTRFS_MULTIPLE_OBJECTIDS: printf("MULTIPLE"); break; case BTRFS_FIRST_CHUNK_TREE_OBJECTID: printf("FIRST_CHUNK_TREE"); break; default: printf("%llu", objectid); } } void btrfs_print_key(struct btrfs_disk_key *disk_key) { u8 type; printf("key ("); type = btrfs_disk_key_type(disk_key); print_objectid((unsigned long long)btrfs_disk_key_objectid(disk_key), type); printf(" "); print_key_type(type); printf(" %llu)", (unsigned long long)btrfs_disk_key_offset(disk_key)); } void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) { int i; char *str; struct btrfs_item *item; struct btrfs_root_item *ri; struct btrfs_dir_item *di; struct btrfs_inode_item *ii; struct btrfs_file_extent_item *fi; struct btrfs_csum_item *ci; struct btrfs_block_group_item *bi; struct btrfs_extent_data_ref *dref; struct btrfs_shared_data_ref *sref; struct btrfs_inode_ref *iref; struct btrfs_dev_extent *dev_extent; struct btrfs_disk_key disk_key; struct btrfs_root_item root_item; struct btrfs_block_group_item bg_item; struct btrfs_dir_log_item *dlog; u32 nr = btrfs_header_nritems(l); u32 type; printf("leaf %llu items %d free space %d generation %llu owner %llu\n", (unsigned long long)btrfs_header_bytenr(l), nr, btrfs_leaf_free_space(root, l), (unsigned long long)btrfs_header_generation(l), (unsigned long long)btrfs_header_owner(l)); print_uuids(l); fflush(stdout); for (i = 0 ; i < nr ; i++) { item = btrfs_item_nr(l, i); btrfs_item_key(l, &disk_key, i); type = btrfs_disk_key_type(&disk_key); printf("\titem %d ", i); btrfs_print_key(&disk_key); printf(" itemoff %d itemsize %d\n", btrfs_item_offset(l, item), btrfs_item_size(l, item)); switch (type) { case BTRFS_INODE_ITEM_KEY: ii = btrfs_item_ptr(l, i, struct btrfs_inode_item); printf("\t\tinode generation %llu size %llu block group %llu mode %o links %u\n", (unsigned long long)btrfs_inode_generation(l, ii), (unsigned long long)btrfs_inode_size(l, ii), (unsigned long long)btrfs_inode_block_group(l,ii), btrfs_inode_mode(l, ii), btrfs_inode_nlink(l, ii)); break; case BTRFS_INODE_REF_KEY: iref = btrfs_item_ptr(l, i, struct btrfs_inode_ref); print_inode_ref_item(l, item, iref); break; case BTRFS_DIR_ITEM_KEY: case BTRFS_DIR_INDEX_KEY: case BTRFS_XATTR_ITEM_KEY: di = btrfs_item_ptr(l, i, struct btrfs_dir_item); print_dir_item(l, item, di); break; case BTRFS_DIR_LOG_INDEX_KEY: case BTRFS_DIR_LOG_ITEM_KEY: dlog = btrfs_item_ptr(l, i, struct btrfs_dir_log_item); printf("\t\tdir log end %Lu\n", btrfs_dir_log_end(l, dlog)); break; case BTRFS_ORPHAN_ITEM_KEY: printf("\t\torphan item\n"); break; case BTRFS_ROOT_ITEM_KEY: ri = btrfs_item_ptr(l, i, struct btrfs_root_item); read_extent_buffer(l, &root_item, (unsigned long)ri, sizeof(root_item)); printf("\t\troot data bytenr %llu level %d dirid %llu refs %u\n", (unsigned long long)btrfs_root_bytenr(&root_item), btrfs_root_level(&root_item), (unsigned long long)btrfs_root_dirid(&root_item), btrfs_root_refs(&root_item)); if (btrfs_root_refs(&root_item) == 0) { struct btrfs_key drop_key; btrfs_disk_key_to_cpu(&drop_key, &root_item.drop_progress); printf("\t\tdrop "); btrfs_print_key(&root_item.drop_progress); printf(" level %d\n", root_item.drop_level); } break; case BTRFS_ROOT_REF_KEY: print_root_ref(l, i, "ref"); break; case BTRFS_ROOT_BACKREF_KEY: print_root_ref(l, i, "backref"); break; case BTRFS_EXTENT_ITEM_KEY: print_extent_item(l, i); break; case BTRFS_TREE_BLOCK_REF_KEY: printf("\t\ttree block backref\n"); break; case BTRFS_SHARED_BLOCK_REF_KEY: printf("\t\tshared block backref\n"); break; case BTRFS_EXTENT_DATA_REF_KEY: dref = btrfs_item_ptr(l, i, struct btrfs_extent_data_ref); printf("\t\textent data backref root %llu " "objectid %llu offset %llu count %u\n", (unsigned long long)btrfs_extent_data_ref_root(l, dref), (unsigned long long)btrfs_extent_data_ref_objectid(l, dref), (unsigned long long)btrfs_extent_data_ref_offset(l, dref), btrfs_extent_data_ref_count(l, dref)); break; case BTRFS_SHARED_DATA_REF_KEY: sref = btrfs_item_ptr(l, i, struct btrfs_shared_data_ref); printf("\t\tshared data backref count %u\n", btrfs_shared_data_ref_count(l, sref)); break; case BTRFS_EXTENT_REF_V0_KEY: #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 print_extent_ref_v0(l, i); #else BUG(); #endif break; case BTRFS_CSUM_ITEM_KEY: ci = btrfs_item_ptr(l, i, struct btrfs_csum_item); printf("\t\tcsum item\n"); break; case BTRFS_EXTENT_CSUM_KEY: ci = btrfs_item_ptr(l, i, struct btrfs_csum_item); printf("\t\textent csum item\n"); break; case BTRFS_EXTENT_DATA_KEY: fi = btrfs_item_ptr(l, i, struct btrfs_file_extent_item); print_file_extent_item(l, item, fi); break; case BTRFS_BLOCK_GROUP_ITEM_KEY: bi = btrfs_item_ptr(l, i, struct btrfs_block_group_item); read_extent_buffer(l, &bg_item, (unsigned long)bi, sizeof(bg_item)); printf("\t\tblock group used %llu chunk_objectid %llu flags %llu\n", (unsigned long long)btrfs_block_group_used(&bg_item), (unsigned long long)btrfs_block_group_chunk_objectid(&bg_item), (unsigned long long)btrfs_block_group_flags(&bg_item)); break; case BTRFS_CHUNK_ITEM_KEY: print_chunk(l, btrfs_item_ptr(l, i, struct btrfs_chunk)); break; case BTRFS_DEV_ITEM_KEY: print_dev_item(l, btrfs_item_ptr(l, i, struct btrfs_dev_item)); break; case BTRFS_DEV_EXTENT_KEY: dev_extent = btrfs_item_ptr(l, i, struct btrfs_dev_extent); printf("\t\tdev extent chunk_tree %llu\n" "\t\tchunk objectid %llu chunk offset %llu " "length %llu\n", (unsigned long long) btrfs_dev_extent_chunk_tree(l, dev_extent), (unsigned long long) btrfs_dev_extent_chunk_objectid(l, dev_extent), (unsigned long long) btrfs_dev_extent_chunk_offset(l, dev_extent), (unsigned long long) btrfs_dev_extent_length(l, dev_extent)); break; case BTRFS_STRING_ITEM_KEY: /* dirty, but it's simple */ str = l->data + btrfs_item_ptr_offset(l, i); printf("\t\titem data %.*s\n", btrfs_item_size(l, item), str); break; }; fflush(stdout); } } void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *eb) { int i; u32 nr; u32 size; struct btrfs_disk_key disk_key; struct btrfs_key key; if (!eb) return; nr = btrfs_header_nritems(eb); if (btrfs_is_leaf(eb)) { btrfs_print_leaf(root, eb); return; } printf("node %llu level %d items %d free %u generation %llu owner %llu\n", (unsigned long long)eb->start, btrfs_header_level(eb), nr, (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr, (unsigned long long)btrfs_header_generation(eb), (unsigned long long)btrfs_header_owner(eb)); print_uuids(eb); fflush(stdout); size = btrfs_level_size(root, btrfs_header_level(eb) - 1); for (i = 0; i < nr; i++) { u64 blocknr = btrfs_node_blockptr(eb, i); btrfs_node_key(eb, &disk_key, i); btrfs_disk_key_to_cpu(&key, &disk_key); printf("\t"); btrfs_print_key(&disk_key); printf(" block %llu (%llu) gen %llu\n", (unsigned long long)blocknr, (unsigned long long)blocknr / size, (unsigned long long)btrfs_node_ptr_generation(eb, i)); fflush(stdout); } for (i = 0; i < nr; i++) { struct extent_buffer *next = read_tree_block(root, btrfs_node_blockptr(eb, i), size, btrfs_node_ptr_generation(eb, i)); if (!next) { fprintf(stderr, "failed to read %llu in tree %llu\n", (unsigned long long)btrfs_node_blockptr(eb, i), (unsigned long long)btrfs_header_owner(eb)); continue; } if (btrfs_is_leaf(next) && btrfs_header_level(eb) != 1) BUG(); if (btrfs_header_level(next) != btrfs_header_level(eb) - 1) BUG(); btrfs_print_tree(root, next); free_extent_buffer(next); } } partclone-0.2.51/src/btrfs/print-tree.h000066400000000000000000000017011200565264100177370ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __PRINT_TREE_ #define __PRINT_TREE_ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l); void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *t); void btrfs_print_key(struct btrfs_disk_key *disk_key); #endif partclone-0.2.51/src/btrfs/radix-tree.c000066400000000000000000000504671200565264100177220ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ /* * Copyright (C) 2001 Momchil Velikov * Portions Copyright (C) 2001 Christoph Hellwig * Copyright (C) 2005 SGI, Christoph Lameter * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "kerncompat.h" #include "radix-tree.h" #ifdef __KERNEL__ #define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6) #else #define RADIX_TREE_MAP_SHIFT 3 /* For more stressful testing */ #endif #define RADIX_TREE_MAP_SIZE (1UL << RADIX_TREE_MAP_SHIFT) #define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE-1) #define RADIX_TREE_TAG_LONGS \ ((RADIX_TREE_MAP_SIZE + BITS_PER_LONG - 1) / BITS_PER_LONG) struct radix_tree_node { unsigned int count; void *slots[RADIX_TREE_MAP_SIZE]; unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; }; struct radix_tree_path { struct radix_tree_node *node; int offset; }; #define RADIX_TREE_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(unsigned long)) #define RADIX_TREE_MAX_PATH (RADIX_TREE_INDEX_BITS/RADIX_TREE_MAP_SHIFT + 2) static unsigned long height_to_maxindex[RADIX_TREE_MAX_PATH] __read_mostly; /* * Per-cpu pool of preloaded nodes */ struct radix_tree_preload { int nr; struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH]; }; struct radix_tree_preload radix_tree_preloads = { 0, }; static inline gfp_t root_gfp_mask(struct radix_tree_root *root) { return root->gfp_mask & __GFP_BITS_MASK; } static int internal_nodes = 0; /* * This assumes that the caller has performed appropriate preallocation, and * that the caller has pinned this thread of control to the current CPU. */ static struct radix_tree_node * radix_tree_node_alloc(struct radix_tree_root *root) { struct radix_tree_node *ret; ret = malloc(sizeof(struct radix_tree_node)); if (ret) { memset(ret, 0, sizeof(struct radix_tree_node)); internal_nodes++; } return ret; } static inline void radix_tree_node_free(struct radix_tree_node *node) { internal_nodes--; free(node); } /* * Load up this CPU's radix_tree_node buffer with sufficient objects to * ensure that the addition of a single element in the tree cannot fail. On * success, return zero, with preemption disabled. On error, return -ENOMEM * with preemption not disabled. */ int radix_tree_preload(gfp_t gfp_mask) { struct radix_tree_preload *rtp; struct radix_tree_node *node; int ret = -ENOMEM; preempt_disable(); rtp = &__get_cpu_var(radix_tree_preloads); while (rtp->nr < ARRAY_SIZE(rtp->nodes)) { preempt_enable(); node = radix_tree_node_alloc(NULL); if (node == NULL) goto out; preempt_disable(); rtp = &__get_cpu_var(radix_tree_preloads); if (rtp->nr < ARRAY_SIZE(rtp->nodes)) rtp->nodes[rtp->nr++] = node; else radix_tree_node_free(node); } ret = 0; out: return ret; } static inline void tag_set(struct radix_tree_node *node, unsigned int tag, int offset) { __set_bit(offset, node->tags[tag]); } static inline void tag_clear(struct radix_tree_node *node, unsigned int tag, int offset) { __clear_bit(offset, node->tags[tag]); } static inline int tag_get(struct radix_tree_node *node, unsigned int tag, int offset) { return test_bit(offset, node->tags[tag]); } static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag) { root->gfp_mask |= (__force gfp_t)(1 << (tag + __GFP_BITS_SHIFT)); } static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag) { root->gfp_mask &= (__force gfp_t)~(1 << (tag + __GFP_BITS_SHIFT)); } static inline void root_tag_clear_all(struct radix_tree_root *root) { root->gfp_mask &= __GFP_BITS_MASK; } static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag) { return (__force unsigned)root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT)); } /* * Returns 1 if any slot in the node has this tag set. * Otherwise returns 0. */ static inline int any_tag_set(struct radix_tree_node *node, unsigned int tag) { int idx; for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) { if (node->tags[tag][idx]) return 1; } return 0; } /* * Return the maximum key which can be store into a * radix tree with height HEIGHT. */ static inline unsigned long radix_tree_maxindex(unsigned int height) { return height_to_maxindex[height]; } /* * Extend a radix tree so it can store key @index. */ static int radix_tree_extend(struct radix_tree_root *root, unsigned long index) { struct radix_tree_node *node; unsigned int height; int tag; /* Figure out what the height should be. */ height = root->height + 1; while (index > radix_tree_maxindex(height)) height++; if (root->rnode == NULL) { root->height = height; goto out; } do { if (!(node = radix_tree_node_alloc(root))) return -ENOMEM; /* Increase the height. */ node->slots[0] = root->rnode; /* Propagate the aggregated tag info into the new root */ for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { if (root_tag_get(root, tag)) tag_set(node, tag, 0); } node->count = 1; root->rnode = node; root->height++; } while (height > root->height); out: return 0; } /** * radix_tree_insert - insert into a radix tree * @root: radix tree root * @index: index key * @item: item to insert * * Insert an item into the radix tree at position @index. */ int radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item) { struct radix_tree_node *node = NULL, *slot; unsigned int height, shift; int offset; int error; /* Make sure the tree is high enough. */ if (index > radix_tree_maxindex(root->height)) { error = radix_tree_extend(root, index); if (error) return error; } slot = root->rnode; height = root->height; shift = (height-1) * RADIX_TREE_MAP_SHIFT; offset = 0; /* uninitialised var warning */ while (height > 0) { if (slot == NULL) { /* Have to add a child node. */ if (!(slot = radix_tree_node_alloc(root))) return -ENOMEM; if (node) { node->slots[offset] = slot; node->count++; } else root->rnode = slot; } /* Go a level down */ offset = (index >> shift) & RADIX_TREE_MAP_MASK; node = slot; slot = node->slots[offset]; shift -= RADIX_TREE_MAP_SHIFT; height--; } if (slot != NULL) return -EEXIST; if (node) { node->count++; node->slots[offset] = item; BUG_ON(tag_get(node, 0, offset)); BUG_ON(tag_get(node, 1, offset)); } else { root->rnode = item; BUG_ON(root_tag_get(root, 0)); BUG_ON(root_tag_get(root, 1)); } return 0; } static inline void **__lookup_slot(struct radix_tree_root *root, unsigned long index) { unsigned int height, shift; struct radix_tree_node **slot; height = root->height; if (index > radix_tree_maxindex(height)) return NULL; if (height == 0 && root->rnode) return (void *)&root->rnode; shift = (height-1) * RADIX_TREE_MAP_SHIFT; slot = &root->rnode; while (height > 0) { if (*slot == NULL) return NULL; slot = (struct radix_tree_node **) ((*slot)->slots + ((index >> shift) & RADIX_TREE_MAP_MASK)); shift -= RADIX_TREE_MAP_SHIFT; height--; } return (void **)slot; } /** * radix_tree_lookup_slot - lookup a slot in a radix tree * @root: radix tree root * @index: index key * * Lookup the slot corresponding to the position @index in the radix tree * @root. This is useful for update-if-exists operations. */ void **radix_tree_lookup_slot(struct radix_tree_root *root, unsigned long index) { return __lookup_slot(root, index); } /** * radix_tree_lookup - perform lookup operation on a radix tree * @root: radix tree root * @index: index key * * Lookup the item at the position @index in the radix tree @root. */ void *radix_tree_lookup(struct radix_tree_root *root, unsigned long index) { void **slot; slot = __lookup_slot(root, index); return slot != NULL ? *slot : NULL; } /** * radix_tree_tag_set - set a tag on a radix tree node * @root: radix tree root * @index: index key * @tag: tag index * * Set the search tag (which must be < RADIX_TREE_MAX_TAGS) * corresponding to @index in the radix tree. From * the root all the way down to the leaf node. * * Returns the address of the tagged item. Setting a tag on a not-present * item is a bug. */ void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag) { unsigned int height, shift; struct radix_tree_node *slot; height = root->height; BUG_ON(index > radix_tree_maxindex(height)); slot = root->rnode; shift = (height - 1) * RADIX_TREE_MAP_SHIFT; while (height > 0) { int offset; offset = (index >> shift) & RADIX_TREE_MAP_MASK; if (!tag_get(slot, tag, offset)) tag_set(slot, tag, offset); slot = slot->slots[offset]; BUG_ON(slot == NULL); shift -= RADIX_TREE_MAP_SHIFT; height--; } /* set the root's tag bit */ if (slot && !root_tag_get(root, tag)) root_tag_set(root, tag); return slot; } /** * radix_tree_tag_clear - clear a tag on a radix tree node * @root: radix tree root * @index: index key * @tag: tag index * * Clear the search tag (which must be < RADIX_TREE_MAX_TAGS) * corresponding to @index in the radix tree. If * this causes the leaf node to have no tags set then clear the tag in the * next-to-leaf node, etc. * * Returns the address of the tagged item on success, else NULL. ie: * has the same return value and semantics as radix_tree_lookup(). */ void *radix_tree_tag_clear(struct radix_tree_root *root, unsigned long index, unsigned int tag) { struct radix_tree_path path[RADIX_TREE_MAX_PATH], *pathp = path; struct radix_tree_node *slot = NULL; unsigned int height, shift; height = root->height; if (index > radix_tree_maxindex(height)) goto out; shift = (height - 1) * RADIX_TREE_MAP_SHIFT; pathp->node = NULL; slot = root->rnode; while (height > 0) { int offset; if (slot == NULL) goto out; offset = (index >> shift) & RADIX_TREE_MAP_MASK; pathp[1].offset = offset; pathp[1].node = slot; slot = slot->slots[offset]; pathp++; shift -= RADIX_TREE_MAP_SHIFT; height--; } if (slot == NULL) goto out; while (pathp->node) { if (!tag_get(pathp->node, tag, pathp->offset)) goto out; tag_clear(pathp->node, tag, pathp->offset); if (any_tag_set(pathp->node, tag)) goto out; pathp--; } /* clear the root's tag bit */ if (root_tag_get(root, tag)) root_tag_clear(root, tag); out: return slot; } #ifndef __KERNEL__ /* Only the test harness uses this at present */ /** * radix_tree_tag_get - get a tag on a radix tree node * @root: radix tree root * @index: index key * @tag: tag index (< RADIX_TREE_MAX_TAGS) * * Return values: * * 0: tag not present or not set * 1: tag set */ int radix_tree_tag_get(struct radix_tree_root *root, unsigned long index, unsigned int tag) { unsigned int height, shift; struct radix_tree_node *slot; int saw_unset_tag = 0; height = root->height; if (index > radix_tree_maxindex(height)) return 0; /* check the root's tag bit */ if (!root_tag_get(root, tag)) return 0; if (height == 0) return 1; shift = (height - 1) * RADIX_TREE_MAP_SHIFT; slot = root->rnode; for ( ; ; ) { int offset; if (slot == NULL) return 0; offset = (index >> shift) & RADIX_TREE_MAP_MASK; /* * This is just a debug check. Later, we can bale as soon as * we see an unset tag. */ if (!tag_get(slot, tag, offset)) saw_unset_tag = 1; if (height == 1) { int ret = tag_get(slot, tag, offset); BUG_ON(ret && saw_unset_tag); return !!ret; } slot = slot->slots[offset]; shift -= RADIX_TREE_MAP_SHIFT; height--; } } #endif static unsigned int __lookup(struct radix_tree_root *root, void **results, unsigned long index, unsigned int max_items, unsigned long *next_index) { unsigned int nr_found = 0; unsigned int shift, height; struct radix_tree_node *slot; unsigned long i; height = root->height; if (height == 0) { if (root->rnode && index == 0) results[nr_found++] = root->rnode; goto out; } shift = (height-1) * RADIX_TREE_MAP_SHIFT; slot = root->rnode; for ( ; height > 1; height--) { for (i = (index >> shift) & RADIX_TREE_MAP_MASK ; i < RADIX_TREE_MAP_SIZE; i++) { if (slot->slots[i] != NULL) break; index &= ~((1UL << shift) - 1); index += 1UL << shift; if (index == 0) goto out; /* 32-bit wraparound */ } if (i == RADIX_TREE_MAP_SIZE) goto out; shift -= RADIX_TREE_MAP_SHIFT; slot = slot->slots[i]; } /* Bottom level: grab some items */ for (i = index & RADIX_TREE_MAP_MASK; i < RADIX_TREE_MAP_SIZE; i++) { index++; if (slot->slots[i]) { results[nr_found++] = slot->slots[i]; if (nr_found == max_items) goto out; } } out: *next_index = index; return nr_found; } /** * radix_tree_gang_lookup - perform multiple lookup on a radix tree * @root: radix tree root * @results: where the results of the lookup are placed * @first_index: start the lookup from this key * @max_items: place up to this many items at *results * * Performs an index-ascending scan of the tree for present items. Places * them at *@results and returns the number of items which were placed at * *@results. * * The implementation is naive. */ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items) { const unsigned long max_index = radix_tree_maxindex(root->height); unsigned long cur_index = first_index; unsigned int ret = 0; while (ret < max_items) { unsigned int nr_found; unsigned long next_index; /* Index of next search */ if (cur_index > max_index) break; nr_found = __lookup(root, results + ret, cur_index, max_items - ret, &next_index); ret += nr_found; if (next_index == 0) break; cur_index = next_index; } return ret; } /* * FIXME: the two tag_get()s here should use find_next_bit() instead of * open-coding the search. */ static unsigned int __lookup_tag(struct radix_tree_root *root, void **results, unsigned long index, unsigned int max_items, unsigned long *next_index, unsigned int tag) { unsigned int nr_found = 0; unsigned int shift; unsigned int height = root->height; struct radix_tree_node *slot; if (height == 0) { if (root->rnode && index == 0) results[nr_found++] = root->rnode; goto out; } shift = (height - 1) * RADIX_TREE_MAP_SHIFT; slot = root->rnode; do { unsigned long i = (index >> shift) & RADIX_TREE_MAP_MASK; for ( ; i < RADIX_TREE_MAP_SIZE; i++) { if (tag_get(slot, tag, i)) { BUG_ON(slot->slots[i] == NULL); break; } index &= ~((1UL << shift) - 1); index += 1UL << shift; if (index == 0) goto out; /* 32-bit wraparound */ } if (i == RADIX_TREE_MAP_SIZE) goto out; height--; if (height == 0) { /* Bottom level: grab some items */ unsigned long j = index & RADIX_TREE_MAP_MASK; for ( ; j < RADIX_TREE_MAP_SIZE; j++) { index++; if (tag_get(slot, tag, j)) { BUG_ON(slot->slots[j] == NULL); results[nr_found++] = slot->slots[j]; if (nr_found == max_items) goto out; } } } shift -= RADIX_TREE_MAP_SHIFT; slot = slot->slots[i]; } while (height > 0); out: *next_index = index; return nr_found; } /** * radix_tree_gang_lookup_tag - perform multiple lookup on a radix tree * based on a tag * @root: radix tree root * @results: where the results of the lookup are placed * @first_index: start the lookup from this key * @max_items: place up to this many items at *results * @tag: the tag index (< RADIX_TREE_MAX_TAGS) * * Performs an index-ascending scan of the tree for present items which * have the tag indexed by @tag set. Places the items at *@results and * returns the number of items which were placed at *@results. */ unsigned int radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items, unsigned int tag) { const unsigned long max_index = radix_tree_maxindex(root->height); unsigned long cur_index = first_index; unsigned int ret = 0; /* check the root's tag bit */ if (!root_tag_get(root, tag)) return 0; while (ret < max_items) { unsigned int nr_found; unsigned long next_index; /* Index of next search */ if (cur_index > max_index) break; nr_found = __lookup_tag(root, results + ret, cur_index, max_items - ret, &next_index, tag); ret += nr_found; if (next_index == 0) break; cur_index = next_index; } return ret; } /** * radix_tree_shrink - shrink height of a radix tree to minimal * @root radix tree root */ static inline void radix_tree_shrink(struct radix_tree_root *root) { /* try to shrink tree height */ while (root->height > 0 && root->rnode->count == 1 && root->rnode->slots[0]) { struct radix_tree_node *to_free = root->rnode; root->rnode = to_free->slots[0]; root->height--; /* must only free zeroed nodes into the slab */ tag_clear(to_free, 0, 0); tag_clear(to_free, 1, 0); to_free->slots[0] = NULL; to_free->count = 0; radix_tree_node_free(to_free); } } /** * radix_tree_delete - delete an item from a radix tree * @root: radix tree root * @index: index key * * Remove the item at @index from the radix tree rooted at @root. * * Returns the address of the deleted item, or NULL if it was not present. */ void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) { struct radix_tree_path path[RADIX_TREE_MAX_PATH], *pathp = path; struct radix_tree_node *slot = NULL; unsigned int height, shift; int tag; int offset; height = root->height; if (index > radix_tree_maxindex(height)) goto out; slot = root->rnode; if (height == 0 && root->rnode) { root_tag_clear_all(root); root->rnode = NULL; goto out; } shift = (height - 1) * RADIX_TREE_MAP_SHIFT; pathp->node = NULL; do { if (slot == NULL) goto out; pathp++; offset = (index >> shift) & RADIX_TREE_MAP_MASK; pathp->offset = offset; pathp->node = slot; slot = slot->slots[offset]; shift -= RADIX_TREE_MAP_SHIFT; height--; } while (height > 0); if (slot == NULL) goto out; /* * Clear all tags associated with the just-deleted item */ for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { if (tag_get(pathp->node, tag, pathp->offset)) radix_tree_tag_clear(root, index, tag); } /* Now free the nodes we do not need anymore */ while (pathp->node) { pathp->node->slots[pathp->offset] = NULL; pathp->node->count--; if (pathp->node->count) { if (pathp->node == root->rnode) radix_tree_shrink(root); goto out; } /* Node with zero slots in use so free it */ radix_tree_node_free(pathp->node); pathp--; } root_tag_clear_all(root); root->height = 0; root->rnode = NULL; out: return slot; } /** * radix_tree_tagged - test whether any items in the tree are tagged * @root: radix tree root * @tag: tag to test */ int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag) { return root_tag_get(root, tag); } static unsigned long __maxindex(unsigned int height) { unsigned int tmp = height * RADIX_TREE_MAP_SHIFT; unsigned long index = (~0UL >> (RADIX_TREE_INDEX_BITS - tmp - 1)) >> 1; if (tmp >= RADIX_TREE_INDEX_BITS) index = ~0UL; return index; } static void radix_tree_init_maxindex(void) { unsigned int i; for (i = 0; i < ARRAY_SIZE(height_to_maxindex); i++) height_to_maxindex[i] = __maxindex(i); } void radix_tree_init(void) { radix_tree_init_maxindex(); } partclone-0.2.51/src/btrfs/radix-tree.h000066400000000000000000000062621200565264100177210ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ /* * Copyright (C) 2001 Momchil Velikov * Portions Copyright (C) 2001 Christoph Hellwig * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _LINUX_RADIX_TREE_H #define _LINUX_RADIX_TREE_H #include "kerncompat.h" #define RADIX_TREE_MAX_TAGS 2 /* root tags are stored in gfp_mask, shifted by __GFP_BITS_SHIFT */ struct radix_tree_root { unsigned int height; gfp_t gfp_mask; struct radix_tree_node *rnode; }; #define RADIX_TREE_INIT(mask) { \ .height = 0, \ .gfp_mask = (mask), \ .rnode = NULL, \ } #define RADIX_TREE(name, mask) \ struct radix_tree_root name = RADIX_TREE_INIT(mask) #define INIT_RADIX_TREE(root, mask) \ do { \ (root)->height = 0; \ (root)->gfp_mask = (mask); \ (root)->rnode = NULL; \ } while (0) int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); void *radix_tree_lookup(struct radix_tree_root *, unsigned long); void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long); void *radix_tree_delete(struct radix_tree_root *, unsigned long); unsigned int radix_tree_gang_lookup(struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items); int radix_tree_preload(gfp_t gfp_mask); void radix_tree_init(void); void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag); void *radix_tree_tag_clear(struct radix_tree_root *root, unsigned long index, unsigned int tag); int radix_tree_tag_get(struct radix_tree_root *root, unsigned long index, unsigned int tag); unsigned int radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items, unsigned int tag); int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); static inline void radix_tree_preload_end(void) { preempt_enable(); } #endif /* _LINUX_RADIX_TREE_H */ partclone-0.2.51/src/btrfs/rbtree.c000066400000000000000000000206341200565264100171320ustar00rootroot00000000000000/* Red Black Trees (C) 1999 Andrea Arcangeli (C) 2002 David Woodhouse This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA linux/lib/rbtree.c */ #include "rbtree.h" static void __rb_rotate_left(struct rb_node *node, struct rb_root *root) { struct rb_node *right = node->rb_right; struct rb_node *parent = rb_parent(node); if ((node->rb_right = right->rb_left)) rb_set_parent(right->rb_left, node); right->rb_left = node; rb_set_parent(right, parent); if (parent) { if (node == parent->rb_left) parent->rb_left = right; else parent->rb_right = right; } else root->rb_node = right; rb_set_parent(node, right); } static void __rb_rotate_right(struct rb_node *node, struct rb_root *root) { struct rb_node *left = node->rb_left; struct rb_node *parent = rb_parent(node); if ((node->rb_left = left->rb_right)) rb_set_parent(left->rb_right, node); left->rb_right = node; rb_set_parent(left, parent); if (parent) { if (node == parent->rb_right) parent->rb_right = left; else parent->rb_left = left; } else root->rb_node = left; rb_set_parent(node, left); } void rb_insert_color(struct rb_node *node, struct rb_root *root) { struct rb_node *parent, *gparent; while ((parent = rb_parent(node)) && rb_is_red(parent)) { gparent = rb_parent(parent); if (parent == gparent->rb_left) { { register struct rb_node *uncle = gparent->rb_right; if (uncle && rb_is_red(uncle)) { rb_set_black(uncle); rb_set_black(parent); rb_set_red(gparent); node = gparent; continue; } } if (parent->rb_right == node) { register struct rb_node *tmp; __rb_rotate_left(parent, root); tmp = parent; parent = node; node = tmp; } rb_set_black(parent); rb_set_red(gparent); __rb_rotate_right(gparent, root); } else { { register struct rb_node *uncle = gparent->rb_left; if (uncle && rb_is_red(uncle)) { rb_set_black(uncle); rb_set_black(parent); rb_set_red(gparent); node = gparent; continue; } } if (parent->rb_left == node) { register struct rb_node *tmp; __rb_rotate_right(parent, root); tmp = parent; parent = node; node = tmp; } rb_set_black(parent); rb_set_red(gparent); __rb_rotate_left(gparent, root); } } rb_set_black(root->rb_node); } static void __rb_erase_color(struct rb_node *node, struct rb_node *parent, struct rb_root *root) { struct rb_node *other; while ((!node || rb_is_black(node)) && node != root->rb_node) { if (parent->rb_left == node) { other = parent->rb_right; if (rb_is_red(other)) { rb_set_black(other); rb_set_red(parent); __rb_rotate_left(parent, root); other = parent->rb_right; } if ((!other->rb_left || rb_is_black(other->rb_left)) && (!other->rb_right || rb_is_black(other->rb_right))) { rb_set_red(other); node = parent; parent = rb_parent(node); } else { if (!other->rb_right || rb_is_black(other->rb_right)) { struct rb_node *o_left; if ((o_left = other->rb_left)) rb_set_black(o_left); rb_set_red(other); __rb_rotate_right(other, root); other = parent->rb_right; } rb_set_color(other, rb_color(parent)); rb_set_black(parent); if (other->rb_right) rb_set_black(other->rb_right); __rb_rotate_left(parent, root); node = root->rb_node; break; } } else { other = parent->rb_left; if (rb_is_red(other)) { rb_set_black(other); rb_set_red(parent); __rb_rotate_right(parent, root); other = parent->rb_left; } if ((!other->rb_left || rb_is_black(other->rb_left)) && (!other->rb_right || rb_is_black(other->rb_right))) { rb_set_red(other); node = parent; parent = rb_parent(node); } else { if (!other->rb_left || rb_is_black(other->rb_left)) { register struct rb_node *o_right; if ((o_right = other->rb_right)) rb_set_black(o_right); rb_set_red(other); __rb_rotate_left(other, root); other = parent->rb_left; } rb_set_color(other, rb_color(parent)); rb_set_black(parent); if (other->rb_left) rb_set_black(other->rb_left); __rb_rotate_right(parent, root); node = root->rb_node; break; } } } if (node) rb_set_black(node); } void rb_erase(struct rb_node *node, struct rb_root *root) { struct rb_node *child, *parent; int color; if (!node->rb_left) child = node->rb_right; else if (!node->rb_right) child = node->rb_left; else { struct rb_node *old = node, *left; node = node->rb_right; while ((left = node->rb_left) != NULL) node = left; child = node->rb_right; parent = rb_parent(node); color = rb_color(node); if (child) rb_set_parent(child, parent); if (parent == old) { parent->rb_right = child; parent = node; } else parent->rb_left = child; node->rb_parent_color = old->rb_parent_color; node->rb_right = old->rb_right; node->rb_left = old->rb_left; if (rb_parent(old)) { if (rb_parent(old)->rb_left == old) rb_parent(old)->rb_left = node; else rb_parent(old)->rb_right = node; } else root->rb_node = node; rb_set_parent(old->rb_left, node); if (old->rb_right) rb_set_parent(old->rb_right, node); goto color; } parent = rb_parent(node); color = rb_color(node); if (child) rb_set_parent(child, parent); if (parent) { if (parent->rb_left == node) parent->rb_left = child; else parent->rb_right = child; } else root->rb_node = child; color: if (color == RB_BLACK) __rb_erase_color(child, parent, root); } /* * This function returns the first node (in sort order) of the tree. */ struct rb_node *rb_first(struct rb_root *root) { struct rb_node *n; n = root->rb_node; if (!n) return NULL; while (n->rb_left) n = n->rb_left; return n; } struct rb_node *rb_last(struct rb_root *root) { struct rb_node *n; n = root->rb_node; if (!n) return NULL; while (n->rb_right) n = n->rb_right; return n; } struct rb_node *rb_next(struct rb_node *node) { struct rb_node *parent; if (rb_parent(node) == node) return NULL; /* If we have a right-hand child, go down and then left as far as we can. */ if (node->rb_right) { node = node->rb_right; while (node->rb_left) node=node->rb_left; return node; } /* No right-hand children. Everything down and left is smaller than us, so any 'next' node must be in the general direction of our parent. Go up the tree; any time the ancestor is a right-hand child of its parent, keep going up. First time it's a left-hand child of its parent, said parent is our 'next' node. */ while ((parent = rb_parent(node)) && node == parent->rb_right) node = parent; return parent; } struct rb_node *rb_prev(struct rb_node *node) { struct rb_node *parent; if (rb_parent(node) == node) return NULL; /* If we have a left-hand child, go down and then right as far as we can. */ if (node->rb_left) { node = node->rb_left; while (node->rb_right) node=node->rb_right; return node; } /* No left-hand children. Go up till we find an ancestor which is a right-hand child of its parent */ while ((parent = rb_parent(node)) && node == parent->rb_left) node = parent; return parent; } void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root) { struct rb_node *parent = rb_parent(victim); /* Set the surrounding nodes to point to the replacement */ if (parent) { if (victim == parent->rb_left) parent->rb_left = new; else parent->rb_right = new; } else { root->rb_node = new; } if (victim->rb_left) rb_set_parent(victim->rb_left, new); if (victim->rb_right) rb_set_parent(victim->rb_right, new); /* Copy the pointers/colour from the victim to the replacement */ *new = *victim; } partclone-0.2.51/src/btrfs/rbtree.h000066400000000000000000000115361200565264100171400ustar00rootroot00000000000000/* Red Black Trees (C) 1999 Andrea Arcangeli This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA linux/include/linux/rbtree.h To use rbtrees you'll have to implement your own insert and search cores. This will avoid us to use callbacks and to drop drammatically performances. I know it's not the cleaner way, but in C (not in C++) to get performances and genericity... Some example of insert and search follows here. The search is a plain normal search over an ordered tree. The insert instead must be implemented int two steps: as first thing the code must insert the element in order as a red leaf in the tree, then the support library function rb_insert_color() must be called. Such function will do the not trivial work to rebalance the rbtree if necessary. ----------------------------------------------------------------------- static inline struct page * rb_search_page_cache(struct inode * inode, unsigned long offset) { struct rb_node * n = inode->i_rb_page_cache.rb_node; struct page * page; while (n) { page = rb_entry(n, struct page, rb_page_cache); if (offset < page->offset) n = n->rb_left; else if (offset > page->offset) n = n->rb_right; else return page; } return NULL; } static inline struct page * __rb_insert_page_cache(struct inode * inode, unsigned long offset, struct rb_node * node) { struct rb_node ** p = &inode->i_rb_page_cache.rb_node; struct rb_node * parent = NULL; struct page * page; while (*p) { parent = *p; page = rb_entry(parent, struct page, rb_page_cache); if (offset < page->offset) p = &(*p)->rb_left; else if (offset > page->offset) p = &(*p)->rb_right; else return page; } rb_link_node(node, parent, p); return NULL; } static inline struct page * rb_insert_page_cache(struct inode * inode, unsigned long offset, struct rb_node * node) { struct page * ret; if ((ret = __rb_insert_page_cache(inode, offset, node))) goto out; rb_insert_color(node, &inode->i_rb_page_cache); out: return ret; } ----------------------------------------------------------------------- */ #ifndef _LINUX_RBTREE_H #define _LINUX_RBTREE_H #include "kerncompat.h" struct rb_node { unsigned long rb_parent_color; #define RB_RED 0 #define RB_BLACK 1 struct rb_node *rb_right; struct rb_node *rb_left; } __attribute__((aligned(sizeof(long)))); /* The alignment might seem pointless, but allegedly CRIS needs it */ struct rb_root { struct rb_node *rb_node; void (*rotate_notify)(struct rb_node *old_parent, struct rb_node *node); }; #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3)) #define rb_color(r) ((r)->rb_parent_color & 1) #define rb_is_red(r) (!rb_color(r)) #define rb_is_black(r) rb_color(r) #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0) #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0) static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) { rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; } static inline void rb_set_color(struct rb_node *rb, int color) { rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; } #define RB_ROOT (struct rb_root) { NULL, } #define rb_entry(ptr, type, member) container_of(ptr, type, member) #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) #define RB_EMPTY_NODE(node) (rb_parent(node) == node) #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) extern void rb_insert_color(struct rb_node *, struct rb_root *); extern void rb_erase(struct rb_node *, struct rb_root *); /* Find logical next and previous nodes in a tree */ extern struct rb_node *rb_next(struct rb_node *); extern struct rb_node *rb_prev(struct rb_node *); extern struct rb_node *rb_first(struct rb_root *); extern struct rb_node *rb_last(struct rb_root *); /* Fast replacement of a single node without remove/rebalance/add/rebalance */ extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root); static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, struct rb_node ** rb_link) { node->rb_parent_color = (unsigned long )parent; node->rb_left = node->rb_right = NULL; *rb_link = node; } #endif /* _LINUX_RBTREE_H */ partclone-0.2.51/src/btrfs/root-tree.c000066400000000000000000000143161200565264100175670ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #include "ctree.h" #include "transaction.h" #include "disk-io.h" #include "print-tree.h" int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct btrfs_root_item *item, struct btrfs_key *key) { struct btrfs_path *path; struct btrfs_key search_key; struct btrfs_key found_key; struct extent_buffer *l; int ret; int slot; search_key.objectid = objectid; search_key.type = BTRFS_ROOT_ITEM_KEY; search_key.offset = (u64)-1; path = btrfs_alloc_path(); BUG_ON(!path); ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0); if (ret < 0) goto out; BUG_ON(ret == 0); l = path->nodes[0]; BUG_ON(path->slots[0] == 0); slot = path->slots[0] - 1; btrfs_item_key_to_cpu(l, &found_key, slot); if (found_key.objectid != objectid) { ret = 1; goto out; } read_extent_buffer(l, item, btrfs_item_ptr_offset(l, slot), sizeof(*item)); memcpy(key, &found_key, sizeof(found_key)); ret = 0; out: btrfs_release_path(root, path); btrfs_free_path(path); return ret; } int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_root_item *item) { struct btrfs_path *path; struct extent_buffer *l; int ret; int slot; unsigned long ptr; path = btrfs_alloc_path(); BUG_ON(!path); ret = btrfs_search_slot(trans, root, key, path, 0, 1); if (ret < 0) goto out; BUG_ON(ret != 0); l = path->nodes[0]; slot = path->slots[0]; ptr = btrfs_item_ptr_offset(l, slot); write_extent_buffer(l, item, ptr, sizeof(*item)); btrfs_mark_buffer_dirty(path->nodes[0]); out: btrfs_release_path(root, path); btrfs_free_path(path); return ret; } int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_root_item *item) { int ret; ret = btrfs_insert_item(trans, root, key, item, sizeof(*item)); return ret; } #if 0 int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid, struct btrfs_root *latest) { struct btrfs_root *dead_root; struct btrfs_item *item; struct btrfs_root_item *ri; struct btrfs_key key; struct btrfs_path *path; int ret; u32 nritems; struct extent_buffer *leaf; int slot; key.objectid = objectid; btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); key.offset = 0; path = btrfs_alloc_path(); if (!path) return -ENOMEM; ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (ret < 0) goto err; while(1) { leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); slot = path->slots[0]; if (slot >= nritems) { ret = btrfs_next_leaf(root, path); if (ret) break; leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); slot = path->slots[0]; } item = btrfs_item_nr(leaf, slot); btrfs_item_key_to_cpu(leaf, &key, slot); if (btrfs_key_type(&key) != BTRFS_ROOT_ITEM_KEY) goto next; if (key.objectid < objectid) goto next; if (key.objectid > objectid) break; ri = btrfs_item_ptr(leaf, slot, struct btrfs_root_item); if (btrfs_disk_root_refs(leaf, ri) != 0) goto next; dead_root = btrfs_read_fs_root_no_radix(root->fs_info, &key); if (IS_ERR(dead_root)) { ret = PTR_ERR(dead_root); goto err; } ret = btrfs_add_dead_root(dead_root, latest, &root->fs_info->dead_roots); if (ret) goto err; next: slot++; path->slots[0]++; } ret = 0; err: btrfs_free_path(path); return ret; } #endif int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key) { struct btrfs_path *path; int ret; u32 refs; struct btrfs_root_item *ri; struct extent_buffer *leaf; path = btrfs_alloc_path(); BUG_ON(!path); ret = btrfs_search_slot(trans, root, key, path, -1, 1); if (ret < 0) goto out; if (ret) { btrfs_print_leaf(root, path->nodes[0]); printk("failed to del %llu %u %llu\n", (unsigned long long)key->objectid, key->type, (unsigned long long)key->offset); } BUG_ON(ret != 0); leaf = path->nodes[0]; ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item); refs = btrfs_disk_root_refs(leaf, ri); BUG_ON(refs != 0); ret = btrfs_del_item(trans, root, path); out: btrfs_release_path(root, path); btrfs_free_path(path); return ret; } /* * add a btrfs_root_ref item. type is either BTRFS_ROOT_REF_KEY * or BTRFS_ROOT_BACKREF_KEY. * * The dirid, sequence, name and name_len refer to the directory entry * that is referencing the root. * * For a forward ref, the root_id is the id of the tree referencing * the root and ref_id is the id of the subvol or snapshot. * * For a back ref the root_id is the id of the subvol or snapshot and * ref_id is the id of the tree referencing it. */ int btrfs_add_root_ref(struct btrfs_trans_handle *trans, struct btrfs_root *tree_root, u64 root_id, u8 type, u64 ref_id, u64 dirid, u64 sequence, const char *name, int name_len) { struct btrfs_key key; int ret; struct btrfs_path *path; struct btrfs_root_ref *ref; struct extent_buffer *leaf; unsigned long ptr; path = btrfs_alloc_path(); key.objectid = root_id; key.type = type; key.offset = ref_id; ret = btrfs_insert_empty_item(trans, tree_root, path, &key, sizeof(*ref) + name_len); BUG_ON(ret); leaf = path->nodes[0]; ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); btrfs_set_root_ref_dirid(leaf, ref, dirid); btrfs_set_root_ref_sequence(leaf, ref, sequence); btrfs_set_root_ref_name_len(leaf, ref, name_len); ptr = (unsigned long)(ref + 1); write_extent_buffer(leaf, name, ptr, name_len); btrfs_mark_buffer_dirty(leaf); btrfs_free_path(path); return ret; } partclone-0.2.51/src/btrfs/transaction.h000066400000000000000000000033241200565264100201760ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __TRANSACTION__ #define __TRANSACTION__ struct btrfs_trans_handle { u64 transid; u64 alloc_exclude_start; u64 alloc_exclude_nr; unsigned long blocks_reserved; unsigned long blocks_used; struct btrfs_block_group_cache *block_group; }; static inline struct btrfs_trans_handle * btrfs_start_transaction(struct btrfs_root *root, int num_blocks) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_trans_handle *h = malloc(sizeof(*h)); BUG_ON(root->commit_root); BUG_ON(fs_info->running_transaction); fs_info->running_transaction = h; fs_info->generation++; h->transid = fs_info->generation; h->alloc_exclude_start = 0; h->alloc_exclude_nr = 0; h->blocks_reserved = num_blocks; h->blocks_used = 0; h->block_group = NULL; root->last_trans = h->transid; root->commit_root = root->node; extent_buffer_get(root->node); return h; } static inline void btrfs_free_transaction(struct btrfs_root *root, struct btrfs_trans_handle *handle) { memset(handle, 0, sizeof(*handle)); free(handle); } #endif partclone-0.2.51/src/btrfs/utils.c000066400000000000000000000556601200565264100170160ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #define _XOPEN_SOURCE 600 #define __USE_XOPEN2K #include #include #ifndef __CHECKER__ #include #include #endif #include #include #include #include #include #include #include #include "kerncompat.h" #include "radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "crc32c.h" #include "utils.h" #include "volumes.h" #include "ioctl.h" #ifdef __CHECKER__ #define BLKGETSIZE64 0 static inline int ioctl(int fd, int define, u64 *size) { return 0; } #endif static u64 reference_root_table[] = { [1] = BTRFS_ROOT_TREE_OBJECTID, [2] = BTRFS_EXTENT_TREE_OBJECTID, [3] = BTRFS_CHUNK_TREE_OBJECTID, [4] = BTRFS_DEV_TREE_OBJECTID, [5] = BTRFS_FS_TREE_OBJECTID, [6] = BTRFS_CSUM_TREE_OBJECTID, }; int make_btrfs(int fd, const char *device, const char *label, u64 blocks[7], u64 num_bytes, u32 nodesize, u32 leafsize, u32 sectorsize, u32 stripesize) { struct btrfs_super_block super; struct extent_buffer *buf; struct btrfs_root_item root_item; struct btrfs_disk_key disk_key; struct btrfs_extent_item *extent_item; struct btrfs_inode_item *inode_item; struct btrfs_chunk *chunk; struct btrfs_dev_item *dev_item; struct btrfs_dev_extent *dev_extent; u8 chunk_tree_uuid[BTRFS_UUID_SIZE]; u8 *ptr; int i; int ret; u32 itemoff; u32 nritems = 0; u64 first_free; u64 ref_root; u32 array_size; u32 item_size; first_free = BTRFS_SUPER_INFO_OFFSET + sectorsize * 2 - 1; first_free &= ~((u64)sectorsize - 1); memset(&super, 0, sizeof(super)); num_bytes = (num_bytes / sectorsize) * sectorsize; uuid_generate(super.fsid); uuid_generate(super.dev_item.uuid); uuid_generate(chunk_tree_uuid); btrfs_set_super_bytenr(&super, blocks[0]); btrfs_set_super_num_devices(&super, 1); strncpy((char *)&super.magic, BTRFS_MAGIC, sizeof(super.magic)); btrfs_set_super_generation(&super, 1); btrfs_set_super_root(&super, blocks[1]); btrfs_set_super_chunk_root(&super, blocks[3]); btrfs_set_super_total_bytes(&super, num_bytes); btrfs_set_super_bytes_used(&super, 6 * leafsize); btrfs_set_super_sectorsize(&super, sectorsize); btrfs_set_super_leafsize(&super, leafsize); btrfs_set_super_nodesize(&super, nodesize); btrfs_set_super_stripesize(&super, stripesize); btrfs_set_super_csum_type(&super, BTRFS_CSUM_TYPE_CRC32); btrfs_set_super_chunk_root_generation(&super, 1); if (label) strcpy(super.label, label); buf = malloc(sizeof(*buf) + max(sectorsize, leafsize)); /* create the tree of root objects */ memset(buf->data, 0, leafsize); buf->len = leafsize; btrfs_set_header_bytenr(buf, blocks[1]); btrfs_set_header_nritems(buf, 4); btrfs_set_header_generation(buf, 1); btrfs_set_header_backref_rev(buf, BTRFS_MIXED_BACKREF_REV); btrfs_set_header_owner(buf, BTRFS_ROOT_TREE_OBJECTID); write_extent_buffer(buf, super.fsid, (unsigned long) btrfs_header_fsid(buf), BTRFS_FSID_SIZE); write_extent_buffer(buf, chunk_tree_uuid, (unsigned long) btrfs_header_chunk_tree_uuid(buf), BTRFS_UUID_SIZE); /* create the items for the root tree */ memset(&root_item, 0, sizeof(root_item)); inode_item = &root_item.inode; btrfs_set_stack_inode_generation(inode_item, 1); btrfs_set_stack_inode_size(inode_item, 3); btrfs_set_stack_inode_nlink(inode_item, 1); btrfs_set_stack_inode_nbytes(inode_item, leafsize); btrfs_set_stack_inode_mode(inode_item, S_IFDIR | 0755); btrfs_set_root_refs(&root_item, 1); btrfs_set_root_used(&root_item, leafsize); btrfs_set_root_generation(&root_item, 1); memset(&disk_key, 0, sizeof(disk_key)); btrfs_set_disk_key_type(&disk_key, BTRFS_ROOT_ITEM_KEY); btrfs_set_disk_key_offset(&disk_key, 0); nritems = 0; itemoff = __BTRFS_LEAF_DATA_SIZE(leafsize) - sizeof(root_item); btrfs_set_root_bytenr(&root_item, blocks[2]); btrfs_set_disk_key_objectid(&disk_key, BTRFS_EXTENT_TREE_OBJECTID); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), sizeof(root_item)); write_extent_buffer(buf, &root_item, btrfs_item_ptr_offset(buf, nritems), sizeof(root_item)); nritems++; itemoff = itemoff - sizeof(root_item); btrfs_set_root_bytenr(&root_item, blocks[4]); btrfs_set_disk_key_objectid(&disk_key, BTRFS_DEV_TREE_OBJECTID); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), sizeof(root_item)); write_extent_buffer(buf, &root_item, btrfs_item_ptr_offset(buf, nritems), sizeof(root_item)); nritems++; itemoff = itemoff - sizeof(root_item); btrfs_set_root_bytenr(&root_item, blocks[5]); btrfs_set_disk_key_objectid(&disk_key, BTRFS_FS_TREE_OBJECTID); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), sizeof(root_item)); write_extent_buffer(buf, &root_item, btrfs_item_ptr_offset(buf, nritems), sizeof(root_item)); nritems++; itemoff = itemoff - sizeof(root_item); btrfs_set_root_bytenr(&root_item, blocks[6]); btrfs_set_disk_key_objectid(&disk_key, BTRFS_CSUM_TREE_OBJECTID); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), sizeof(root_item)); write_extent_buffer(buf, &root_item, btrfs_item_ptr_offset(buf, nritems), sizeof(root_item)); nritems++; csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, leafsize, blocks[1]); BUG_ON(ret != leafsize); /* create the items for the extent tree */ nritems = 0; itemoff = __BTRFS_LEAF_DATA_SIZE(leafsize); for (i = 1; i < 7; i++) { BUG_ON(blocks[i] < first_free); BUG_ON(blocks[i] < blocks[i - 1]); /* create extent item */ itemoff -= sizeof(struct btrfs_extent_item) + sizeof(struct btrfs_tree_block_info); btrfs_set_disk_key_objectid(&disk_key, blocks[i]); btrfs_set_disk_key_offset(&disk_key, leafsize); btrfs_set_disk_key_type(&disk_key, BTRFS_EXTENT_ITEM_KEY); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), sizeof(struct btrfs_extent_item) + sizeof(struct btrfs_tree_block_info)); extent_item = btrfs_item_ptr(buf, nritems, struct btrfs_extent_item); btrfs_set_extent_refs(buf, extent_item, 1); btrfs_set_extent_generation(buf, extent_item, 1); btrfs_set_extent_flags(buf, extent_item, BTRFS_EXTENT_FLAG_TREE_BLOCK); nritems++; /* create extent ref */ ref_root = reference_root_table[i]; btrfs_set_disk_key_objectid(&disk_key, blocks[i]); btrfs_set_disk_key_offset(&disk_key, ref_root); btrfs_set_disk_key_type(&disk_key, BTRFS_TREE_BLOCK_REF_KEY); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), 0); nritems++; } btrfs_set_header_bytenr(buf, blocks[2]); btrfs_set_header_owner(buf, BTRFS_EXTENT_TREE_OBJECTID); btrfs_set_header_nritems(buf, nritems); csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, leafsize, blocks[2]); BUG_ON(ret != leafsize); /* create the chunk tree */ nritems = 0; item_size = sizeof(*dev_item); itemoff = __BTRFS_LEAF_DATA_SIZE(leafsize) - item_size; /* first device 1 (there is no device 0) */ btrfs_set_disk_key_objectid(&disk_key, BTRFS_DEV_ITEMS_OBJECTID); btrfs_set_disk_key_offset(&disk_key, 1); btrfs_set_disk_key_type(&disk_key, BTRFS_DEV_ITEM_KEY); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), item_size); dev_item = btrfs_item_ptr(buf, nritems, struct btrfs_dev_item); btrfs_set_device_id(buf, dev_item, 1); btrfs_set_device_generation(buf, dev_item, 0); btrfs_set_device_total_bytes(buf, dev_item, num_bytes); btrfs_set_device_bytes_used(buf, dev_item, BTRFS_MKFS_SYSTEM_GROUP_SIZE); btrfs_set_device_io_align(buf, dev_item, sectorsize); btrfs_set_device_io_width(buf, dev_item, sectorsize); btrfs_set_device_sector_size(buf, dev_item, sectorsize); btrfs_set_device_type(buf, dev_item, 0); write_extent_buffer(buf, super.dev_item.uuid, (unsigned long)btrfs_device_uuid(dev_item), BTRFS_UUID_SIZE); write_extent_buffer(buf, super.fsid, (unsigned long)btrfs_device_fsid(dev_item), BTRFS_UUID_SIZE); read_extent_buffer(buf, &super.dev_item, (unsigned long)dev_item, sizeof(*dev_item)); nritems++; item_size = btrfs_chunk_item_size(1); itemoff = itemoff - item_size; /* then we have chunk 0 */ btrfs_set_disk_key_objectid(&disk_key, BTRFS_FIRST_CHUNK_TREE_OBJECTID); btrfs_set_disk_key_offset(&disk_key, 0); btrfs_set_disk_key_type(&disk_key, BTRFS_CHUNK_ITEM_KEY); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), item_size); chunk = btrfs_item_ptr(buf, nritems, struct btrfs_chunk); btrfs_set_chunk_length(buf, chunk, BTRFS_MKFS_SYSTEM_GROUP_SIZE); btrfs_set_chunk_owner(buf, chunk, BTRFS_EXTENT_TREE_OBJECTID); btrfs_set_chunk_stripe_len(buf, chunk, 64 * 1024); btrfs_set_chunk_type(buf, chunk, BTRFS_BLOCK_GROUP_SYSTEM); btrfs_set_chunk_io_align(buf, chunk, sectorsize); btrfs_set_chunk_io_width(buf, chunk, sectorsize); btrfs_set_chunk_sector_size(buf, chunk, sectorsize); btrfs_set_chunk_num_stripes(buf, chunk, 1); btrfs_set_stripe_devid_nr(buf, chunk, 0, 1); btrfs_set_stripe_offset_nr(buf, chunk, 0, 0); nritems++; write_extent_buffer(buf, super.dev_item.uuid, (unsigned long)btrfs_stripe_dev_uuid(&chunk->stripe), BTRFS_UUID_SIZE); /* copy the key for the chunk to the system array */ ptr = super.sys_chunk_array; array_size = sizeof(disk_key); memcpy(ptr, &disk_key, sizeof(disk_key)); ptr += sizeof(disk_key); /* copy the chunk to the system array */ read_extent_buffer(buf, ptr, (unsigned long)chunk, item_size); array_size += item_size; ptr += item_size; btrfs_set_super_sys_array_size(&super, array_size); btrfs_set_header_bytenr(buf, blocks[3]); btrfs_set_header_owner(buf, BTRFS_CHUNK_TREE_OBJECTID); btrfs_set_header_nritems(buf, nritems); csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, leafsize, blocks[3]); /* create the device tree */ nritems = 0; itemoff = __BTRFS_LEAF_DATA_SIZE(leafsize) - sizeof(struct btrfs_dev_extent); btrfs_set_disk_key_objectid(&disk_key, 1); btrfs_set_disk_key_offset(&disk_key, 0); btrfs_set_disk_key_type(&disk_key, BTRFS_DEV_EXTENT_KEY); btrfs_set_item_key(buf, &disk_key, nritems); btrfs_set_item_offset(buf, btrfs_item_nr(buf, nritems), itemoff); btrfs_set_item_size(buf, btrfs_item_nr(buf, nritems), sizeof(struct btrfs_dev_extent)); dev_extent = btrfs_item_ptr(buf, nritems, struct btrfs_dev_extent); btrfs_set_dev_extent_chunk_tree(buf, dev_extent, BTRFS_CHUNK_TREE_OBJECTID); btrfs_set_dev_extent_chunk_objectid(buf, dev_extent, BTRFS_FIRST_CHUNK_TREE_OBJECTID); btrfs_set_dev_extent_chunk_offset(buf, dev_extent, 0); write_extent_buffer(buf, chunk_tree_uuid, (unsigned long)btrfs_dev_extent_chunk_tree_uuid(dev_extent), BTRFS_UUID_SIZE); btrfs_set_dev_extent_length(buf, dev_extent, BTRFS_MKFS_SYSTEM_GROUP_SIZE); nritems++; btrfs_set_header_bytenr(buf, blocks[4]); btrfs_set_header_owner(buf, BTRFS_DEV_TREE_OBJECTID); btrfs_set_header_nritems(buf, nritems); csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, leafsize, blocks[4]); /* create the FS root */ btrfs_set_header_bytenr(buf, blocks[5]); btrfs_set_header_owner(buf, BTRFS_FS_TREE_OBJECTID); btrfs_set_header_nritems(buf, 0); csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, leafsize, blocks[5]); BUG_ON(ret != leafsize); /* finally create the csum root */ btrfs_set_header_bytenr(buf, blocks[6]); btrfs_set_header_owner(buf, BTRFS_CSUM_TREE_OBJECTID); btrfs_set_header_nritems(buf, 0); csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, leafsize, blocks[6]); BUG_ON(ret != leafsize); /* and write out the super block */ BUG_ON(sizeof(super) > sectorsize); memset(buf->data, 0, sectorsize); memcpy(buf->data, &super, sizeof(super)); buf->len = sectorsize; csum_tree_block_size(buf, BTRFS_CRC32_SIZE, 0); ret = pwrite(fd, buf->data, sectorsize, blocks[0]); BUG_ON(ret != sectorsize); free(buf); return 0; } static u64 device_size(int fd, struct stat *st) { u64 size; if (S_ISREG(st->st_mode)) { return st->st_size; } if (!S_ISBLK(st->st_mode)) { return 0; } if (ioctl(fd, BLKGETSIZE64, &size) >= 0) { return size; } return 0; } static int zero_blocks(int fd, off_t start, size_t len) { char *buf = malloc(len); int ret = 0; ssize_t written; if (!buf) return -ENOMEM; memset(buf, 0, len); written = pwrite(fd, buf, len, start); if (written != len) ret = -EIO; free(buf); return ret; } static int zero_dev_start(int fd) { off_t start = 0; size_t len = 2 * 1024 * 1024; #ifdef __sparc__ /* don't overwrite the disk labels on sparc */ start = 1024; len -= 1024; #endif return zero_blocks(fd, start, len); } static int zero_dev_end(int fd, u64 dev_size) { size_t len = 2 * 1024 * 1024; off_t start = dev_size - len; return zero_blocks(fd, start, len); } int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, struct btrfs_root *root, int fd, char *path, u64 block_count, u32 io_width, u32 io_align, u32 sectorsize) { struct btrfs_super_block *disk_super; struct btrfs_super_block *super = &root->fs_info->super_copy; struct btrfs_device *device; struct btrfs_dev_item *dev_item; char *buf; u64 total_bytes; u64 num_devs; int ret; device = kmalloc(sizeof(*device), GFP_NOFS); if (!device) return -ENOMEM; buf = kmalloc(sectorsize, GFP_NOFS); if (!buf) { kfree(device); return -ENOMEM; } BUG_ON(sizeof(*disk_super) > sectorsize); memset(buf, 0, sectorsize); disk_super = (struct btrfs_super_block *)buf; dev_item = &disk_super->dev_item; uuid_generate(device->uuid); device->devid = 0; device->type = 0; device->io_width = io_width; device->io_align = io_align; device->sector_size = sectorsize; device->fd = fd; device->writeable = 1; device->total_bytes = block_count; device->bytes_used = 0; device->total_ios = 0; device->dev_root = root->fs_info->dev_root; ret = btrfs_add_device(trans, root, device); BUG_ON(ret); total_bytes = btrfs_super_total_bytes(super) + block_count; btrfs_set_super_total_bytes(super, total_bytes); num_devs = btrfs_super_num_devices(super) + 1; btrfs_set_super_num_devices(super, num_devs); memcpy(disk_super, super, sizeof(*disk_super)); printf("adding device %s id %llu\n", path, (unsigned long long)device->devid); btrfs_set_super_bytenr(disk_super, BTRFS_SUPER_INFO_OFFSET); btrfs_set_stack_device_id(dev_item, device->devid); btrfs_set_stack_device_type(dev_item, device->type); btrfs_set_stack_device_io_align(dev_item, device->io_align); btrfs_set_stack_device_io_width(dev_item, device->io_width); btrfs_set_stack_device_sector_size(dev_item, device->sector_size); btrfs_set_stack_device_total_bytes(dev_item, device->total_bytes); btrfs_set_stack_device_bytes_used(dev_item, device->bytes_used); memcpy(&dev_item->uuid, device->uuid, BTRFS_UUID_SIZE); ret = pwrite(fd, buf, sectorsize, BTRFS_SUPER_INFO_OFFSET); BUG_ON(ret != sectorsize); kfree(buf); list_add(&device->dev_list, &root->fs_info->fs_devices->devices); device->fs_devices = root->fs_info->fs_devices; return 0; } int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret) { u64 block_count; u64 bytenr; struct stat st; int i, ret; ret = fstat(fd, &st); if (ret < 0) { fprintf(stderr, "unable to stat %s\n", file); exit(1); } block_count = device_size(fd, &st); if (block_count == 0) { fprintf(stderr, "unable to find %s size\n", file); exit(1); } zero_end = 1; if (block_count < 256 * 1024 * 1024) { fprintf(stderr, "device %s is too small " "(must be at least 256 MB)\n", file); exit(1); } ret = zero_dev_start(fd); if (ret) { fprintf(stderr, "failed to zero device start %d\n", ret); exit(1); } for (i = 0 ; i < BTRFS_SUPER_MIRROR_MAX; i++) { bytenr = btrfs_sb_offset(i); if (bytenr >= block_count) break; zero_blocks(fd, bytenr, BTRFS_SUPER_INFO_SIZE); } if (zero_end) { ret = zero_dev_end(fd, block_count); if (ret) { fprintf(stderr, "failed to zero device end %d\n", ret); exit(1); } } *block_count_ret = block_count; return 0; } int btrfs_make_root_dir(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid) { int ret; struct btrfs_inode_item inode_item; memset(&inode_item, 0, sizeof(inode_item)); btrfs_set_stack_inode_generation(&inode_item, trans->transid); btrfs_set_stack_inode_size(&inode_item, 0); btrfs_set_stack_inode_nlink(&inode_item, 1); btrfs_set_stack_inode_nbytes(&inode_item, root->leafsize); btrfs_set_stack_inode_mode(&inode_item, S_IFDIR | 0555); if (root->fs_info->tree_root == root) btrfs_set_super_root_dir(&root->fs_info->super_copy, objectid); ret = btrfs_insert_inode(trans, root, objectid, &inode_item); if (ret) goto error; ret = btrfs_insert_inode_ref(trans, root, "..", 2, objectid, objectid, 0); if (ret) goto error; btrfs_set_root_dirid(&root->root_item, objectid); ret = 0; error: return ret; } /* * returns 1 if the device was mounted, < 0 on error or 0 if everything * is safe to continue. TODO, this should also scan multi-device filesystems */ int check_mounted(char *file) { struct mntent *mnt; struct stat st_buf; dev_t file_dev = 0; dev_t file_rdev = 0; ino_t file_ino = 0; FILE *f; int ret = 0; if ((f = setmntent ("/proc/mounts", "r")) == NULL) return -errno; if (stat(file, &st_buf) < 0) { return -errno; } else { if (S_ISBLK(st_buf.st_mode)) { file_rdev = st_buf.st_rdev; } else { file_dev = st_buf.st_dev; file_ino = st_buf.st_ino; } } while ((mnt = getmntent (f)) != NULL) { if (strcmp(file, mnt->mnt_fsname) == 0) break; if (stat(mnt->mnt_fsname, &st_buf) == 0) { if (S_ISBLK(st_buf.st_mode)) { if (file_rdev && (file_rdev == st_buf.st_rdev)) break; } else if (file_dev && ((file_dev == st_buf.st_dev) && (file_ino == st_buf.st_ino))) { break; } } } if (mnt) { /* found an entry in mnt table */ ret = 1; } endmntent (f); return ret; } struct pending_dir { struct list_head list; char name[256]; }; void btrfs_register_one_device(char *fname) { struct btrfs_ioctl_vol_args args; int fd; int ret; fd = open("/dev/btrfs-control", O_RDONLY); if (fd < 0) { fprintf(stderr, "failed to open /dev/btrfs-control " "skipping device registration\n"); return; } strcpy(args.name, fname); ret = ioctl(fd, BTRFS_IOC_SCAN_DEV, &args); close(fd); } int btrfs_scan_one_dir(char *dirname, int run_ioctl) { DIR *dirp = NULL; struct dirent *dirent; struct pending_dir *pending; struct stat st; int ret; int fd; int dirname_len; int pathlen; char *fullpath; struct list_head pending_list; struct btrfs_fs_devices *tmp_devices; u64 num_devices; INIT_LIST_HEAD(&pending_list); pending = malloc(sizeof(*pending)); if (!pending) return -ENOMEM; strcpy(pending->name, dirname); again: dirname_len = strlen(pending->name); pathlen = 1024; fullpath = malloc(pathlen); dirname = pending->name; if (!fullpath) { ret = -ENOMEM; goto fail; } dirp = opendir(dirname); if (!dirp) { fprintf(stderr, "Unable to open /sys/block for scanning\n"); return -ENOENT; } while(1) { dirent = readdir(dirp); if (!dirent) break; if (dirent->d_name[0] == '.') continue; if (dirname_len + strlen(dirent->d_name) + 2 > pathlen) { ret = -EFAULT; goto fail; } snprintf(fullpath, pathlen, "%s/%s", dirname, dirent->d_name); ret = lstat(fullpath, &st); if (ret < 0) { fprintf(stderr, "failed to stat %s\n", fullpath); continue; } if (S_ISLNK(st.st_mode)) continue; if (S_ISDIR(st.st_mode)) { struct pending_dir *next = malloc(sizeof(*next)); if (!next) { ret = -ENOMEM; goto fail; } strcpy(next->name, fullpath); list_add_tail(&next->list, &pending_list); } if (!S_ISBLK(st.st_mode)) { continue; } fd = open(fullpath, O_RDONLY); if (fd < 0) { fprintf(stderr, "failed to read %s\n", fullpath); continue; } ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices, &num_devices, BTRFS_SUPER_INFO_OFFSET); if (ret == 0 && run_ioctl > 0) { btrfs_register_one_device(fullpath); } close(fd); } if (!list_empty(&pending_list)) { free(pending); pending = list_entry(pending_list.next, struct pending_dir, list); list_del(&pending->list); closedir(dirp); goto again; } ret = 0; fail: free(pending); if (dirp) closedir(dirp); return ret; } int btrfs_scan_for_fsid(struct btrfs_fs_devices *fs_devices, u64 total_devs, int run_ioctls) { return btrfs_scan_one_dir("/dev", run_ioctls); } int btrfs_device_already_in_root(struct btrfs_root *root, int fd, int super_offset) { struct btrfs_super_block *disk_super; char *buf; int ret = 0; buf = malloc(BTRFS_SUPER_INFO_SIZE); if (!buf) { ret = -ENOMEM; goto out; } ret = pread(fd, buf, BTRFS_SUPER_INFO_SIZE, super_offset); if (ret != BTRFS_SUPER_INFO_SIZE) goto brelse; ret = 0; disk_super = (struct btrfs_super_block *)buf; if (strncmp((char *)(&disk_super->magic), BTRFS_MAGIC, sizeof(disk_super->magic))) goto brelse; if (!memcmp(disk_super->fsid, root->fs_info->super_copy.fsid, BTRFS_FSID_SIZE)) ret = 1; brelse: free(buf); out: return ret; } static char *size_strs[] = { "", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; char *pretty_sizes(u64 size) { int num_divs = 0; u64 last_size = size; u64 fract_size = size; float fraction; char *pretty; while(size > 0) { fract_size = last_size; last_size = size; size /= 1024; num_divs++; } if (num_divs == 0) num_divs = 1; if (num_divs > ARRAY_SIZE(size_strs)) return NULL; fraction = (float)fract_size / 1024; pretty = malloc(16); sprintf(pretty, "%.2f%s", fraction, size_strs[num_divs-1]); return pretty; } partclone-0.2.51/src/btrfs/utils.h000066400000000000000000000032511200565264100170100ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __UTILS__ #define __UTILS__ #define BTRFS_MKFS_SYSTEM_GROUP_SIZE (4 * 1024 * 1024) int make_btrfs(int fd, const char *device, const char *label, u64 blocks[6], u64 num_bytes, u32 nodesize, u32 leafsize, u32 sectorsize, u32 stripesize); int btrfs_make_root_dir(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid); int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret); int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, struct btrfs_root *root, int fd, char *path, u64 block_count, u32 io_width, u32 io_align, u32 sectorsize); int btrfs_scan_for_fsid(struct btrfs_fs_devices *fs_devices, u64 total_devs, int run_ioctls); void btrfs_register_one_device(char *fname); int btrfs_scan_one_dir(char *dirname, int run_ioctl); int check_mounted(char *devicename); int btrfs_device_already_in_root(struct btrfs_root *root, int fd, int super_offset); char *pretty_sizes(u64 size); #endif partclone-0.2.51/src/btrfs/version.h000066400000000000000000000001471200565264100173360ustar00rootroot00000000000000#ifndef __BUILD_VERSION #define __BUILD_VERSION #define BTRFS_BUILD_VERSION "Btrfs Btrfs v0.19" #endif partclone-0.2.51/src/btrfs/volumes.c000066400000000000000000001117401200565264100173400ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #define _XOPEN_SOURCE 600 #define __USE_XOPEN2K #include #include #include #include #include #include #include #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "print-tree.h" #include "volumes.h" struct stripe { struct btrfs_device *dev; u64 physical; }; struct map_lookup { struct cache_extent ce; u64 type; int io_align; int io_width; int stripe_len; int sector_size; int num_stripes; int sub_stripes; struct btrfs_bio_stripe stripes[]; }; #define map_lookup_size(n) (sizeof(struct map_lookup) + \ (sizeof(struct btrfs_bio_stripe) * (n))) static LIST_HEAD(fs_uuids); static struct btrfs_device *__find_device(struct list_head *head, u64 devid, u8 *uuid) { struct btrfs_device *dev; struct list_head *cur; list_for_each(cur, head) { dev = list_entry(cur, struct btrfs_device, dev_list); if (dev->devid == devid && !memcmp(dev->uuid, uuid, BTRFS_UUID_SIZE)) { return dev; } } return NULL; } static struct btrfs_fs_devices *find_fsid(u8 *fsid) { struct list_head *cur; struct btrfs_fs_devices *fs_devices; list_for_each(cur, &fs_uuids) { fs_devices = list_entry(cur, struct btrfs_fs_devices, list); if (memcmp(fsid, fs_devices->fsid, BTRFS_FSID_SIZE) == 0) return fs_devices; } return NULL; } static int device_list_add(const char *path, struct btrfs_super_block *disk_super, u64 devid, struct btrfs_fs_devices **fs_devices_ret) { struct btrfs_device *device; struct btrfs_fs_devices *fs_devices; u64 found_transid = btrfs_super_generation(disk_super); fs_devices = find_fsid(disk_super->fsid); if (!fs_devices) { fs_devices = kzalloc(sizeof(*fs_devices), GFP_NOFS); if (!fs_devices) return -ENOMEM; INIT_LIST_HEAD(&fs_devices->devices); list_add(&fs_devices->list, &fs_uuids); memcpy(fs_devices->fsid, disk_super->fsid, BTRFS_FSID_SIZE); fs_devices->latest_devid = devid; fs_devices->latest_trans = found_transid; fs_devices->lowest_devid = (u64)-1; device = NULL; } else { device = __find_device(&fs_devices->devices, devid, disk_super->dev_item.uuid); } if (!device) { device = kzalloc(sizeof(*device), GFP_NOFS); if (!device) { /* we can safely leave the fs_devices entry around */ return -ENOMEM; } device->devid = devid; memcpy(device->uuid, disk_super->dev_item.uuid, BTRFS_UUID_SIZE); device->name = kstrdup(path, GFP_NOFS); if (!device->name) { kfree(device); return -ENOMEM; } device->label = kstrdup(disk_super->label, GFP_NOFS); device->total_devs = btrfs_super_num_devices(disk_super); device->super_bytes_used = btrfs_super_bytes_used(disk_super); device->total_bytes = btrfs_stack_device_total_bytes(&disk_super->dev_item); device->bytes_used = btrfs_stack_device_bytes_used(&disk_super->dev_item); list_add(&device->dev_list, &fs_devices->devices); device->fs_devices = fs_devices; } if (found_transid > fs_devices->latest_trans) { fs_devices->latest_devid = devid; fs_devices->latest_trans = found_transid; } if (fs_devices->lowest_devid > devid) { fs_devices->lowest_devid = devid; } *fs_devices_ret = fs_devices; return 0; } int btrfs_close_devices(struct btrfs_fs_devices *fs_devices) { struct btrfs_fs_devices *seed_devices; struct list_head *cur; struct btrfs_device *device; again: list_for_each(cur, &fs_devices->devices) { device = list_entry(cur, struct btrfs_device, dev_list); close(device->fd); device->fd = -1; device->writeable = 0; } seed_devices = fs_devices->seed; fs_devices->seed = NULL; if (seed_devices) { fs_devices = seed_devices; goto again; } return 0; } int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, int flags) { int fd; struct list_head *head = &fs_devices->devices; struct list_head *cur; struct btrfs_device *device; int ret; list_for_each(cur, head) { device = list_entry(cur, struct btrfs_device, dev_list); fd = open(device->name, flags); if (fd < 0) { ret = -errno; goto fail; } if (device->devid == fs_devices->latest_devid) fs_devices->latest_bdev = fd; if (device->devid == fs_devices->lowest_devid) fs_devices->lowest_bdev = fd; device->fd = fd; if (flags == O_RDWR) device->writeable = 1; } return 0; fail: btrfs_close_devices(fs_devices); return ret; } int btrfs_scan_one_device(int fd, const char *path, struct btrfs_fs_devices **fs_devices_ret, u64 *total_devs, u64 super_offset) { struct btrfs_super_block *disk_super; char *buf; int ret; u64 devid; char uuidbuf[37]; buf = malloc(4096); if (!buf) { ret = -ENOMEM; goto error; } disk_super = (struct btrfs_super_block *)buf; ret = btrfs_read_dev_super(fd, disk_super, super_offset); if (ret < 0) { ret = -EIO; goto error_brelse; } devid = le64_to_cpu(disk_super->dev_item.devid); if (btrfs_super_flags(disk_super) & BTRFS_SUPER_FLAG_METADUMP) *total_devs = 1; else *total_devs = btrfs_super_num_devices(disk_super); uuid_unparse(disk_super->fsid, uuidbuf); ret = device_list_add(path, disk_super, devid, fs_devices_ret); error_brelse: free(buf); error: return ret; } /* * this uses a pretty simple search, the expectation is that it is * called very infrequently and that a given device has a small number * of extents */ static int find_free_dev_extent(struct btrfs_trans_handle *trans, struct btrfs_device *device, struct btrfs_path *path, u64 num_bytes, u64 *start) { struct btrfs_key key; struct btrfs_root *root = device->dev_root; struct btrfs_dev_extent *dev_extent = NULL; u64 hole_size = 0; u64 last_byte = 0; u64 search_start = 0; u64 search_end = device->total_bytes; int ret; int slot = 0; int start_found; struct extent_buffer *l; start_found = 0; path->reada = 2; /* FIXME use last free of some kind */ /* we don't want to overwrite the superblock on the drive, * so we make sure to start at an offset of at least 1MB */ search_start = max((u64)1024 * 1024, search_start); if (root->fs_info->alloc_start + num_bytes <= device->total_bytes) search_start = max(root->fs_info->alloc_start, search_start); key.objectid = device->devid; key.offset = search_start; key.type = BTRFS_DEV_EXTENT_KEY; ret = btrfs_search_slot(trans, root, &key, path, 0, 0); if (ret < 0) goto error; ret = btrfs_previous_item(root, path, 0, key.type); if (ret < 0) goto error; l = path->nodes[0]; btrfs_item_key_to_cpu(l, &key, path->slots[0]); while (1) { l = path->nodes[0]; slot = path->slots[0]; if (slot >= btrfs_header_nritems(l)) { ret = btrfs_next_leaf(root, path); if (ret == 0) continue; if (ret < 0) goto error; no_more_items: if (!start_found) { if (search_start >= search_end) { ret = -ENOSPC; goto error; } *start = search_start; start_found = 1; goto check_pending; } *start = last_byte > search_start ? last_byte : search_start; if (search_end <= *start) { ret = -ENOSPC; goto error; } goto check_pending; } btrfs_item_key_to_cpu(l, &key, slot); if (key.objectid < device->devid) goto next; if (key.objectid > device->devid) goto no_more_items; if (key.offset >= search_start && key.offset > last_byte && start_found) { if (last_byte < search_start) last_byte = search_start; hole_size = key.offset - last_byte; if (key.offset > last_byte && hole_size >= num_bytes) { *start = last_byte; goto check_pending; } } if (btrfs_key_type(&key) != BTRFS_DEV_EXTENT_KEY) { goto next; } start_found = 1; dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent); last_byte = key.offset + btrfs_dev_extent_length(l, dev_extent); next: path->slots[0]++; cond_resched(); } check_pending: /* we have to make sure we didn't find an extent that has already * been allocated by the map tree or the original allocation */ btrfs_release_path(root, path); BUG_ON(*start < search_start); if (*start + num_bytes > search_end) { ret = -ENOSPC; goto error; } /* check for pending inserts here */ return 0; error: btrfs_release_path(root, path); return ret; } int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 num_bytes, u64 *start) { int ret; struct btrfs_path *path; struct btrfs_root *root = device->dev_root; struct btrfs_dev_extent *extent; struct extent_buffer *leaf; struct btrfs_key key; path = btrfs_alloc_path(); if (!path) return -ENOMEM; ret = find_free_dev_extent(trans, device, path, num_bytes, start); if (ret) { goto err; } key.objectid = device->devid; key.offset = *start; key.type = BTRFS_DEV_EXTENT_KEY; ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*extent)); BUG_ON(ret); leaf = path->nodes[0]; extent = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dev_extent); btrfs_set_dev_extent_chunk_tree(leaf, extent, chunk_tree); btrfs_set_dev_extent_chunk_objectid(leaf, extent, chunk_objectid); btrfs_set_dev_extent_chunk_offset(leaf, extent, chunk_offset); write_extent_buffer(leaf, root->fs_info->chunk_tree_uuid, (unsigned long)btrfs_dev_extent_chunk_tree_uuid(extent), BTRFS_UUID_SIZE); btrfs_set_dev_extent_length(leaf, extent, num_bytes); btrfs_mark_buffer_dirty(leaf); err: btrfs_free_path(path); return ret; } static int find_next_chunk(struct btrfs_root *root, u64 objectid, u64 *offset) { struct btrfs_path *path; int ret; struct btrfs_key key; struct btrfs_chunk *chunk; struct btrfs_key found_key; path = btrfs_alloc_path(); BUG_ON(!path); key.objectid = objectid; key.offset = (u64)-1; key.type = BTRFS_CHUNK_ITEM_KEY; ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (ret < 0) goto error; BUG_ON(ret == 0); ret = btrfs_previous_item(root, path, 0, BTRFS_CHUNK_ITEM_KEY); if (ret) { *offset = 0; } else { btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); if (found_key.objectid != objectid) *offset = 0; else { chunk = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_chunk); *offset = found_key.offset + btrfs_chunk_length(path->nodes[0], chunk); } } ret = 0; error: btrfs_free_path(path); return ret; } static int find_next_devid(struct btrfs_root *root, struct btrfs_path *path, u64 *objectid) { int ret; struct btrfs_key key; struct btrfs_key found_key; key.objectid = BTRFS_DEV_ITEMS_OBJECTID; key.type = BTRFS_DEV_ITEM_KEY; key.offset = (u64)-1; ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (ret < 0) goto error; BUG_ON(ret == 0); ret = btrfs_previous_item(root, path, BTRFS_DEV_ITEMS_OBJECTID, BTRFS_DEV_ITEM_KEY); if (ret) { *objectid = 1; } else { btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]); *objectid = found_key.offset + 1; } ret = 0; error: btrfs_release_path(root, path); return ret; } /* * the device information is stored in the chunk root * the btrfs_device struct should be fully filled in */ int btrfs_add_device(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_device *device) { int ret; struct btrfs_path *path; struct btrfs_dev_item *dev_item; struct extent_buffer *leaf; struct btrfs_key key; unsigned long ptr; u64 free_devid = 0; root = root->fs_info->chunk_root; path = btrfs_alloc_path(); if (!path) return -ENOMEM; ret = find_next_devid(root, path, &free_devid); if (ret) goto out; key.objectid = BTRFS_DEV_ITEMS_OBJECTID; key.type = BTRFS_DEV_ITEM_KEY; key.offset = free_devid; ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*dev_item)); if (ret) goto out; leaf = path->nodes[0]; dev_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dev_item); device->devid = free_devid; btrfs_set_device_id(leaf, dev_item, device->devid); btrfs_set_device_generation(leaf, dev_item, 0); btrfs_set_device_type(leaf, dev_item, device->type); btrfs_set_device_io_align(leaf, dev_item, device->io_align); btrfs_set_device_io_width(leaf, dev_item, device->io_width); btrfs_set_device_sector_size(leaf, dev_item, device->sector_size); btrfs_set_device_total_bytes(leaf, dev_item, device->total_bytes); btrfs_set_device_bytes_used(leaf, dev_item, device->bytes_used); btrfs_set_device_group(leaf, dev_item, 0); btrfs_set_device_seek_speed(leaf, dev_item, 0); btrfs_set_device_bandwidth(leaf, dev_item, 0); btrfs_set_device_start_offset(leaf, dev_item, 0); ptr = (unsigned long)btrfs_device_uuid(dev_item); write_extent_buffer(leaf, device->uuid, ptr, BTRFS_UUID_SIZE); ptr = (unsigned long)btrfs_device_fsid(dev_item); write_extent_buffer(leaf, root->fs_info->fsid, ptr, BTRFS_UUID_SIZE); btrfs_mark_buffer_dirty(leaf); ret = 0; out: btrfs_free_path(path); return ret; } int btrfs_update_device(struct btrfs_trans_handle *trans, struct btrfs_device *device) { int ret; struct btrfs_path *path; struct btrfs_root *root; struct btrfs_dev_item *dev_item; struct extent_buffer *leaf; struct btrfs_key key; root = device->dev_root->fs_info->chunk_root; path = btrfs_alloc_path(); if (!path) return -ENOMEM; key.objectid = BTRFS_DEV_ITEMS_OBJECTID; key.type = BTRFS_DEV_ITEM_KEY; key.offset = device->devid; ret = btrfs_search_slot(trans, root, &key, path, 0, 1); if (ret < 0) goto out; if (ret > 0) { ret = -ENOENT; goto out; } leaf = path->nodes[0]; dev_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dev_item); btrfs_set_device_id(leaf, dev_item, device->devid); btrfs_set_device_type(leaf, dev_item, device->type); btrfs_set_device_io_align(leaf, dev_item, device->io_align); btrfs_set_device_io_width(leaf, dev_item, device->io_width); btrfs_set_device_sector_size(leaf, dev_item, device->sector_size); btrfs_set_device_total_bytes(leaf, dev_item, device->total_bytes); btrfs_set_device_bytes_used(leaf, dev_item, device->bytes_used); btrfs_mark_buffer_dirty(leaf); out: btrfs_free_path(path); return ret; } int btrfs_add_system_chunk(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_chunk *chunk, int item_size) { struct btrfs_super_block *super_copy = &root->fs_info->super_copy; struct btrfs_disk_key disk_key; u32 array_size; u8 *ptr; array_size = btrfs_super_sys_array_size(super_copy); if (array_size + item_size > BTRFS_SYSTEM_CHUNK_ARRAY_SIZE) return -EFBIG; ptr = super_copy->sys_chunk_array + array_size; btrfs_cpu_key_to_disk(&disk_key, key); memcpy(ptr, &disk_key, sizeof(disk_key)); ptr += sizeof(disk_key); memcpy(ptr, chunk, item_size); item_size += sizeof(disk_key); btrfs_set_super_sys_array_size(super_copy, array_size + item_size); return 0; } static u64 div_factor(u64 num, int factor) { if (factor == 10) return num; num *= factor; return num / 10; } static u64 chunk_bytes_by_type(u64 type, u64 calc_size, int num_stripes, int sub_stripes) { if (type & (BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP)) return calc_size; else if (type & BTRFS_BLOCK_GROUP_RAID10) return calc_size * (num_stripes / sub_stripes); else return calc_size * num_stripes; } int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 *start, u64 *num_bytes, u64 type) { u64 dev_offset; struct btrfs_fs_info *info = extent_root->fs_info; struct btrfs_root *chunk_root = extent_root->fs_info->chunk_root; struct btrfs_stripe *stripes; struct btrfs_device *device = NULL; struct btrfs_chunk *chunk; struct list_head private_devs; struct list_head *dev_list = &extent_root->fs_info->fs_devices->devices; struct list_head *cur; struct map_lookup *map; int min_stripe_size = 1 * 1024 * 1024; u64 physical; u64 calc_size = 8 * 1024 * 1024; u64 min_free; u64 max_chunk_size = 4 * calc_size; u64 avail; u64 max_avail = 0; u64 percent_max; int num_stripes = 1; int min_stripes = 1; int sub_stripes = 0; int looped = 0; int ret; int index; int stripe_len = 64 * 1024; struct btrfs_key key; if (list_empty(dev_list)) { return -ENOSPC; } if (type & (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_RAID10 | BTRFS_BLOCK_GROUP_DUP)) { if (type & BTRFS_BLOCK_GROUP_SYSTEM) { calc_size = 8 * 1024 * 1024; max_chunk_size = calc_size * 2; min_stripe_size = 1 * 1024 * 1024; } else if (type & BTRFS_BLOCK_GROUP_DATA) { calc_size = 1024 * 1024 * 1024; max_chunk_size = 10 * calc_size; min_stripe_size = 64 * 1024 * 1024; } else if (type & BTRFS_BLOCK_GROUP_METADATA) { calc_size = 1024 * 1024 * 1024; max_chunk_size = 4 * calc_size; min_stripe_size = 32 * 1024 * 1024; } } if (type & BTRFS_BLOCK_GROUP_RAID1) { num_stripes = min_t(u64, 2, btrfs_super_num_devices(&info->super_copy)); if (num_stripes < 2) return -ENOSPC; min_stripes = 2; } if (type & BTRFS_BLOCK_GROUP_DUP) { num_stripes = 2; min_stripes = 2; } if (type & (BTRFS_BLOCK_GROUP_RAID0)) { num_stripes = btrfs_super_num_devices(&info->super_copy); min_stripes = 2; } if (type & (BTRFS_BLOCK_GROUP_RAID10)) { num_stripes = btrfs_super_num_devices(&info->super_copy); if (num_stripes < 4) return -ENOSPC; num_stripes &= ~(u32)1; sub_stripes = 2; min_stripes = 4; } /* we don't want a chunk larger than 10% of the FS */ percent_max = div_factor(btrfs_super_total_bytes(&info->super_copy), 1); max_chunk_size = min(percent_max, max_chunk_size); again: if (chunk_bytes_by_type(type, calc_size, num_stripes, sub_stripes) > max_chunk_size) { calc_size = max_chunk_size; calc_size /= num_stripes; calc_size /= stripe_len; calc_size *= stripe_len; } /* we don't want tiny stripes */ calc_size = max_t(u64, calc_size, min_stripe_size); calc_size /= stripe_len; calc_size *= stripe_len; INIT_LIST_HEAD(&private_devs); cur = dev_list->next; index = 0; if (type & BTRFS_BLOCK_GROUP_DUP) min_free = calc_size * 2; else min_free = calc_size; /* build a private list of devices we will allocate from */ while(index < num_stripes) { device = list_entry(cur, struct btrfs_device, dev_list); avail = device->total_bytes - device->bytes_used; cur = cur->next; if (avail >= min_free) { list_move_tail(&device->dev_list, &private_devs); index++; if (type & BTRFS_BLOCK_GROUP_DUP) index++; } else if (avail > max_avail) max_avail = avail; if (cur == dev_list) break; } if (index < num_stripes) { list_splice(&private_devs, dev_list); if (index >= min_stripes) { num_stripes = index; if (type & (BTRFS_BLOCK_GROUP_RAID10)) { num_stripes /= sub_stripes; num_stripes *= sub_stripes; } looped = 1; goto again; } if (!looped && max_avail > 0) { looped = 1; calc_size = max_avail; goto again; } return -ENOSPC; } key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; key.type = BTRFS_CHUNK_ITEM_KEY; ret = find_next_chunk(chunk_root, BTRFS_FIRST_CHUNK_TREE_OBJECTID, &key.offset); if (ret) return ret; chunk = kmalloc(btrfs_chunk_item_size(num_stripes), GFP_NOFS); if (!chunk) return -ENOMEM; map = kmalloc(map_lookup_size(num_stripes), GFP_NOFS); if (!map) { kfree(chunk); return -ENOMEM; } stripes = &chunk->stripe; *num_bytes = chunk_bytes_by_type(type, calc_size, num_stripes, sub_stripes); index = 0; while(index < num_stripes) { struct btrfs_stripe *stripe; BUG_ON(list_empty(&private_devs)); cur = private_devs.next; device = list_entry(cur, struct btrfs_device, dev_list); /* loop over this device again if we're doing a dup group */ if (!(type & BTRFS_BLOCK_GROUP_DUP) || (index == num_stripes - 1)) list_move_tail(&device->dev_list, dev_list); ret = btrfs_alloc_dev_extent(trans, device, info->chunk_root->root_key.objectid, BTRFS_FIRST_CHUNK_TREE_OBJECTID, key.offset, calc_size, &dev_offset); BUG_ON(ret); device->bytes_used += calc_size; ret = btrfs_update_device(trans, device); BUG_ON(ret); map->stripes[index].dev = device; map->stripes[index].physical = dev_offset; stripe = stripes + index; btrfs_set_stack_stripe_devid(stripe, device->devid); btrfs_set_stack_stripe_offset(stripe, dev_offset); memcpy(stripe->dev_uuid, device->uuid, BTRFS_UUID_SIZE); physical = dev_offset; index++; } BUG_ON(!list_empty(&private_devs)); /* key was set above */ btrfs_set_stack_chunk_length(chunk, *num_bytes); btrfs_set_stack_chunk_owner(chunk, extent_root->root_key.objectid); btrfs_set_stack_chunk_stripe_len(chunk, stripe_len); btrfs_set_stack_chunk_type(chunk, type); btrfs_set_stack_chunk_num_stripes(chunk, num_stripes); btrfs_set_stack_chunk_io_align(chunk, stripe_len); btrfs_set_stack_chunk_io_width(chunk, stripe_len); btrfs_set_stack_chunk_sector_size(chunk, extent_root->sectorsize); btrfs_set_stack_chunk_sub_stripes(chunk, sub_stripes); map->sector_size = extent_root->sectorsize; map->stripe_len = stripe_len; map->io_align = stripe_len; map->io_width = stripe_len; map->type = type; map->num_stripes = num_stripes; map->sub_stripes = sub_stripes; ret = btrfs_insert_item(trans, chunk_root, &key, chunk, btrfs_chunk_item_size(num_stripes)); BUG_ON(ret); *start = key.offset;; map->ce.start = key.offset; map->ce.size = *num_bytes; ret = insert_existing_cache_extent( &extent_root->fs_info->mapping_tree.cache_tree, &map->ce); BUG_ON(ret); if (type & BTRFS_BLOCK_GROUP_SYSTEM) { ret = btrfs_add_system_chunk(trans, chunk_root, &key, chunk, btrfs_chunk_item_size(num_stripes)); BUG_ON(ret); } kfree(chunk); return ret; } void btrfs_mapping_init(struct btrfs_mapping_tree *tree) { cache_tree_init(&tree->cache_tree); } int btrfs_num_copies(struct btrfs_mapping_tree *map_tree, u64 logical, u64 len) { struct cache_extent *ce; struct map_lookup *map; int ret; u64 offset; ce = find_first_cache_extent(&map_tree->cache_tree, logical); BUG_ON(!ce); BUG_ON(ce->start > logical || ce->start + ce->size < logical); map = container_of(ce, struct map_lookup, ce); offset = logical - ce->start; if (map->type & (BTRFS_BLOCK_GROUP_DUP | BTRFS_BLOCK_GROUP_RAID1)) ret = map->num_stripes; else if (map->type & BTRFS_BLOCK_GROUP_RAID10) ret = map->sub_stripes; else ret = 1; return ret; } int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, u64 chunk_start, u64 physical, u64 devid, u64 **logical, int *naddrs, int *stripe_len) { struct cache_extent *ce; struct map_lookup *map; u64 *buf; u64 bytenr; u64 length; u64 stripe_nr; int i, j, nr = 0; ce = find_first_cache_extent(&map_tree->cache_tree, chunk_start); BUG_ON(!ce); map = container_of(ce, struct map_lookup, ce); length = ce->size; if (map->type & BTRFS_BLOCK_GROUP_RAID10) length = ce->size / (map->num_stripes / map->sub_stripes); else if (map->type & BTRFS_BLOCK_GROUP_RAID0) length = ce->size / map->num_stripes; buf = kzalloc(sizeof(u64) * map->num_stripes, GFP_NOFS); for (i = 0; i < map->num_stripes; i++) { if (devid && map->stripes[i].dev->devid != devid) continue; if (map->stripes[i].physical > physical || map->stripes[i].physical + length <= physical) continue; stripe_nr = (physical - map->stripes[i].physical) / map->stripe_len; if (map->type & BTRFS_BLOCK_GROUP_RAID10) { stripe_nr = (stripe_nr * map->num_stripes + i) / map->sub_stripes; } else if (map->type & BTRFS_BLOCK_GROUP_RAID0) { stripe_nr = stripe_nr * map->num_stripes + i; } bytenr = ce->start + stripe_nr * map->stripe_len; for (j = 0; j < nr; j++) { if (buf[j] == bytenr) break; } if (j == nr) buf[nr++] = bytenr; } *logical = buf; *naddrs = nr; *stripe_len = map->stripe_len; return 0; } int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, u64 logical, u64 *length, struct btrfs_multi_bio **multi_ret, int mirror_num) { struct cache_extent *ce; struct map_lookup *map; u64 offset; u64 stripe_offset; u64 stripe_nr; int stripes_allocated = 8; int stripes_required = 1; int stripe_index; int i; struct btrfs_multi_bio *multi = NULL; if (multi_ret && rw == READ) { stripes_allocated = 1; } again: if (multi_ret) { multi = kzalloc(btrfs_multi_bio_size(stripes_allocated), GFP_NOFS); if (!multi) return -ENOMEM; } ce = find_first_cache_extent(&map_tree->cache_tree, logical); BUG_ON(!ce); BUG_ON(ce->start > logical || ce->start + ce->size < logical); map = container_of(ce, struct map_lookup, ce); offset = logical - ce->start; if (rw == WRITE) { if (map->type & (BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP)) { stripes_required = map->num_stripes; } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { stripes_required = map->sub_stripes; } } /* if our multi bio struct is too small, back off and try again */ if (multi_ret && rw == WRITE && stripes_allocated < stripes_required) { stripes_allocated = map->num_stripes; kfree(multi); goto again; } stripe_nr = offset; /* * stripe_nr counts the total number of stripes we have to stride * to get to this block */ stripe_nr = stripe_nr / map->stripe_len; stripe_offset = stripe_nr * map->stripe_len; BUG_ON(offset < stripe_offset); /* stripe_offset is the offset of this block in its stripe*/ stripe_offset = offset - stripe_offset; if (map->type & (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_RAID10 | BTRFS_BLOCK_GROUP_DUP)) { /* we limit the length of each bio to what fits in a stripe */ *length = min_t(u64, ce->size - offset, map->stripe_len - stripe_offset); } else { *length = ce->size - offset; } if (!multi_ret) goto out; multi->num_stripes = 1; stripe_index = 0; if (map->type & BTRFS_BLOCK_GROUP_RAID1) { if (rw == WRITE) multi->num_stripes = map->num_stripes; else if (mirror_num) stripe_index = mirror_num - 1; else stripe_index = stripe_nr % map->num_stripes; } else if (map->type & BTRFS_BLOCK_GROUP_RAID10) { int factor = map->num_stripes / map->sub_stripes; stripe_index = stripe_nr % factor; stripe_index *= map->sub_stripes; if (rw == WRITE) multi->num_stripes = map->sub_stripes; else if (mirror_num) stripe_index += mirror_num - 1; else stripe_index = stripe_nr % map->sub_stripes; stripe_nr = stripe_nr / factor; } else if (map->type & BTRFS_BLOCK_GROUP_DUP) { if (rw == WRITE) multi->num_stripes = map->num_stripes; else if (mirror_num) stripe_index = mirror_num - 1; } else { /* * after this do_div call, stripe_nr is the number of stripes * on this device we have to walk to find the data, and * stripe_index is the number of our device in the stripe array */ stripe_index = stripe_nr % map->num_stripes; stripe_nr = stripe_nr / map->num_stripes; } BUG_ON(stripe_index >= map->num_stripes); for (i = 0; i < multi->num_stripes; i++) { multi->stripes[i].physical = map->stripes[stripe_index].physical + stripe_offset + stripe_nr * map->stripe_len; multi->stripes[i].dev = map->stripes[stripe_index].dev; stripe_index++; } *multi_ret = multi; out: return 0; } struct btrfs_device *btrfs_find_device(struct btrfs_root *root, u64 devid, u8 *uuid, u8 *fsid) { struct btrfs_device *device; struct btrfs_fs_devices *cur_devices; cur_devices = root->fs_info->fs_devices; while (cur_devices) { if (!fsid || !memcmp(cur_devices->fsid, fsid, BTRFS_UUID_SIZE)) { device = __find_device(&cur_devices->devices, devid, uuid); if (device) return device; } cur_devices = cur_devices->seed; } return NULL; } int btrfs_bootstrap_super_map(struct btrfs_mapping_tree *map_tree, struct btrfs_fs_devices *fs_devices) { struct map_lookup *map; u64 logical = BTRFS_SUPER_INFO_OFFSET; u64 length = BTRFS_SUPER_INFO_SIZE; int num_stripes = 0; int sub_stripes = 0; int ret; int i; struct list_head *cur; list_for_each(cur, &fs_devices->devices) { num_stripes++; } map = kmalloc(map_lookup_size(num_stripes), GFP_NOFS); if (!map) return -ENOMEM; map->ce.start = logical; map->ce.size = length; map->num_stripes = num_stripes; map->sub_stripes = sub_stripes; map->io_width = length; map->io_align = length; map->sector_size = length; map->stripe_len = length; map->type = BTRFS_BLOCK_GROUP_RAID1; i = 0; list_for_each(cur, &fs_devices->devices) { struct btrfs_device *device = list_entry(cur, struct btrfs_device, dev_list); map->stripes[i].physical = logical; map->stripes[i].dev = device; i++; } ret = insert_existing_cache_extent(&map_tree->cache_tree, &map->ce); if (ret == -EEXIST) { struct cache_extent *old; struct map_lookup *old_map; old = find_cache_extent(&map_tree->cache_tree, logical, length); old_map = container_of(old, struct map_lookup, ce); remove_cache_extent(&map_tree->cache_tree, old); kfree(old_map); ret = insert_existing_cache_extent(&map_tree->cache_tree, &map->ce); } BUG_ON(ret); return 0; } int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset) { struct cache_extent *ce; struct map_lookup *map; struct btrfs_mapping_tree *map_tree = &root->fs_info->mapping_tree; int readonly = 0; int i; ce = find_first_cache_extent(&map_tree->cache_tree, chunk_offset); BUG_ON(!ce); map = container_of(ce, struct map_lookup, ce); for (i = 0; i < map->num_stripes; i++) { if (!map->stripes[i].dev->writeable) { readonly = 1; break; } } return readonly; } static int read_one_chunk(struct btrfs_root *root, struct btrfs_key *key, struct extent_buffer *leaf, struct btrfs_chunk *chunk) { struct btrfs_mapping_tree *map_tree = &root->fs_info->mapping_tree; struct map_lookup *map; struct cache_extent *ce; u64 logical; u64 length; u64 devid; u8 uuid[BTRFS_UUID_SIZE]; int num_stripes; int ret; int i; logical = key->offset; length = btrfs_chunk_length(leaf, chunk); ce = find_first_cache_extent(&map_tree->cache_tree, logical); /* already mapped? */ if (ce && ce->start <= logical && ce->start + ce->size > logical) { return 0; } num_stripes = btrfs_chunk_num_stripes(leaf, chunk); map = kmalloc(map_lookup_size(num_stripes), GFP_NOFS); if (!map) return -ENOMEM; map->ce.start = logical; map->ce.size = length; map->num_stripes = num_stripes; map->io_width = btrfs_chunk_io_width(leaf, chunk); map->io_align = btrfs_chunk_io_align(leaf, chunk); map->sector_size = btrfs_chunk_sector_size(leaf, chunk); map->stripe_len = btrfs_chunk_stripe_len(leaf, chunk); map->type = btrfs_chunk_type(leaf, chunk); map->sub_stripes = btrfs_chunk_sub_stripes(leaf, chunk); for (i = 0; i < num_stripes; i++) { map->stripes[i].physical = btrfs_stripe_offset_nr(leaf, chunk, i); devid = btrfs_stripe_devid_nr(leaf, chunk, i); read_extent_buffer(leaf, uuid, (unsigned long) btrfs_stripe_dev_uuid_nr(chunk, i), BTRFS_UUID_SIZE); map->stripes[i].dev = btrfs_find_device(root, devid, uuid, NULL); if (!map->stripes[i].dev) { kfree(map); return -EIO; } } ret = insert_existing_cache_extent(&map_tree->cache_tree, &map->ce); BUG_ON(ret); return 0; } static int fill_device_from_item(struct extent_buffer *leaf, struct btrfs_dev_item *dev_item, struct btrfs_device *device) { unsigned long ptr; device->devid = btrfs_device_id(leaf, dev_item); device->total_bytes = btrfs_device_total_bytes(leaf, dev_item); device->bytes_used = btrfs_device_bytes_used(leaf, dev_item); device->type = btrfs_device_type(leaf, dev_item); device->io_align = btrfs_device_io_align(leaf, dev_item); device->io_width = btrfs_device_io_width(leaf, dev_item); device->sector_size = btrfs_device_sector_size(leaf, dev_item); ptr = (unsigned long)btrfs_device_uuid(dev_item); read_extent_buffer(leaf, device->uuid, ptr, BTRFS_UUID_SIZE); return 0; } static int open_seed_devices(struct btrfs_root *root, u8 *fsid) { struct btrfs_fs_devices *fs_devices; int ret; fs_devices = root->fs_info->fs_devices->seed; while (fs_devices) { if (!memcmp(fs_devices->fsid, fsid, BTRFS_UUID_SIZE)) { ret = 0; goto out; } fs_devices = fs_devices->seed; } fs_devices = find_fsid(fsid); if (!fs_devices) { ret = -ENOENT; goto out; } ret = btrfs_open_devices(fs_devices, O_RDONLY); if (ret) goto out; fs_devices->seed = root->fs_info->fs_devices->seed; root->fs_info->fs_devices->seed = fs_devices; out: return ret; } static int read_one_dev(struct btrfs_root *root, struct extent_buffer *leaf, struct btrfs_dev_item *dev_item) { struct btrfs_device *device; u64 devid; int ret = 0; u8 fs_uuid[BTRFS_UUID_SIZE]; u8 dev_uuid[BTRFS_UUID_SIZE]; devid = btrfs_device_id(leaf, dev_item); read_extent_buffer(leaf, dev_uuid, (unsigned long)btrfs_device_uuid(dev_item), BTRFS_UUID_SIZE); read_extent_buffer(leaf, fs_uuid, (unsigned long)btrfs_device_fsid(dev_item), BTRFS_UUID_SIZE); if (memcmp(fs_uuid, root->fs_info->fsid, BTRFS_UUID_SIZE)) { ret = open_seed_devices(root, fs_uuid); if (ret) return ret; } device = btrfs_find_device(root, devid, dev_uuid, fs_uuid); if (!device) { printk("warning devid %llu not found already\n", (unsigned long long)devid); device = kmalloc(sizeof(*device), GFP_NOFS); if (!device) return -ENOMEM; device->total_ios = 0; list_add(&device->dev_list, &root->fs_info->fs_devices->devices); } fill_device_from_item(leaf, dev_item, device); device->dev_root = root->fs_info->dev_root; return ret; } int btrfs_read_super_device(struct btrfs_root *root, struct extent_buffer *buf) { struct btrfs_dev_item *dev_item; dev_item = (struct btrfs_dev_item *)offsetof(struct btrfs_super_block, dev_item); return read_one_dev(root, buf, dev_item); } int btrfs_read_sys_array(struct btrfs_root *root) { struct btrfs_super_block *super_copy = &root->fs_info->super_copy; struct extent_buffer *sb; struct btrfs_disk_key *disk_key; struct btrfs_chunk *chunk; struct btrfs_key key; u32 num_stripes; u32 array_size; u32 len = 0; u8 *ptr; unsigned long sb_ptr; u32 cur; int ret; sb = btrfs_find_create_tree_block(root, BTRFS_SUPER_INFO_OFFSET, BTRFS_SUPER_INFO_SIZE); if (!sb) return -ENOMEM; btrfs_set_buffer_uptodate(sb); write_extent_buffer(sb, super_copy, 0, BTRFS_SUPER_INFO_SIZE); array_size = btrfs_super_sys_array_size(super_copy); /* * we do this loop twice, once for the device items and * once for all of the chunks. This way there are device * structs filled in for every chunk */ ptr = super_copy->sys_chunk_array; sb_ptr = offsetof(struct btrfs_super_block, sys_chunk_array); cur = 0; while (cur < array_size) { disk_key = (struct btrfs_disk_key *)ptr; btrfs_disk_key_to_cpu(&key, disk_key); len = sizeof(*disk_key); ptr += len; sb_ptr += len; cur += len; if (key.type == BTRFS_CHUNK_ITEM_KEY) { chunk = (struct btrfs_chunk *)sb_ptr; ret = read_one_chunk(root, &key, sb, chunk); BUG_ON(ret); num_stripes = btrfs_chunk_num_stripes(sb, chunk); len = btrfs_chunk_item_size(num_stripes); } else { BUG(); } ptr += len; sb_ptr += len; cur += len; } free_extent_buffer(sb); return 0; } int btrfs_read_chunk_tree(struct btrfs_root *root) { struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_key key; struct btrfs_key found_key; int ret; int slot; root = root->fs_info->chunk_root; path = btrfs_alloc_path(); if (!path) return -ENOMEM; /* first we search for all of the device items, and then we * read in all of the chunk items. This way we can create chunk * mappings that reference all of the devices that are afound */ key.objectid = BTRFS_DEV_ITEMS_OBJECTID; key.offset = 0; key.type = 0; again: ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); while(1) { leaf = path->nodes[0]; slot = path->slots[0]; if (slot >= btrfs_header_nritems(leaf)) { ret = btrfs_next_leaf(root, path); if (ret == 0) continue; if (ret < 0) goto error; break; } btrfs_item_key_to_cpu(leaf, &found_key, slot); if (key.objectid == BTRFS_DEV_ITEMS_OBJECTID) { if (found_key.objectid != BTRFS_DEV_ITEMS_OBJECTID) break; if (found_key.type == BTRFS_DEV_ITEM_KEY) { struct btrfs_dev_item *dev_item; dev_item = btrfs_item_ptr(leaf, slot, struct btrfs_dev_item); ret = read_one_dev(root, leaf, dev_item); BUG_ON(ret); } } else if (found_key.type == BTRFS_CHUNK_ITEM_KEY) { struct btrfs_chunk *chunk; chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk); ret = read_one_chunk(root, &found_key, leaf, chunk); BUG_ON(ret); } path->slots[0]++; } if (key.objectid == BTRFS_DEV_ITEMS_OBJECTID) { key.objectid = 0; btrfs_release_path(root, path); goto again; } btrfs_free_path(path); ret = 0; error: return ret; } struct list_head *btrfs_scanned_uuids(void) { return &fs_uuids; } partclone-0.2.51/src/btrfs/volumes.h000066400000000000000000000077151200565264100173530ustar00rootroot00000000000000/* * Copyright (C) 2007 Oracle. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __BTRFS_VOLUMES_ #define __BTRFS_VOLUMES_ struct btrfs_device { struct list_head dev_list; struct btrfs_root *dev_root; struct btrfs_fs_devices *fs_devices; u64 total_ios; int fd; int writeable; char *name; /* these are read off the super block, only in the progs */ char *label; u64 total_devs; u64 super_bytes_used; /* the internal btrfs device id */ u64 devid; /* size of the device */ u64 total_bytes; /* bytes used */ u64 bytes_used; /* optimal io alignment for this device */ u32 io_align; /* optimal io width for this device */ u32 io_width; /* minimal io size for this device */ u32 sector_size; /* type and info about this device */ u64 type; /* physical drive uuid (or lvm uuid) */ u8 uuid[BTRFS_UUID_SIZE]; }; struct btrfs_fs_devices { u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */ /* the device with this id has the most recent coyp of the super */ u64 latest_devid; u64 latest_trans; u64 lowest_devid; int latest_bdev; int lowest_bdev; struct list_head devices; struct list_head list; int seeding; struct btrfs_fs_devices *seed; }; struct btrfs_bio_stripe { struct btrfs_device *dev; u64 physical; }; struct btrfs_multi_bio { int error; int num_stripes; struct btrfs_bio_stripe stripes[]; }; #define btrfs_multi_bio_size(n) (sizeof(struct btrfs_multi_bio) + \ (sizeof(struct btrfs_bio_stripe) * (n))) int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 chunk_tree, u64 chunk_objectid, u64 chunk_offset, u64 num_bytes, u64 *start); int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, u64 logical, u64 *length, struct btrfs_multi_bio **multi_ret, int mirror_num); int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, u64 chunk_start, u64 physical, u64 devid, u64 **logical, int *naddrs, int *stripe_len); int btrfs_read_sys_array(struct btrfs_root *root); int btrfs_read_chunk_tree(struct btrfs_root *root); int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, struct btrfs_root *extent_root, u64 *start, u64 *num_bytes, u64 type); int btrfs_read_super_device(struct btrfs_root *root, struct extent_buffer *buf); int btrfs_add_device(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_device *device); int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, int flags); int btrfs_close_devices(struct btrfs_fs_devices *fs_devices); int btrfs_add_device(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_device *device); int btrfs_update_device(struct btrfs_trans_handle *trans, struct btrfs_device *device); int btrfs_scan_one_device(int fd, const char *path, struct btrfs_fs_devices **fs_devices_ret, u64 *total_devs, u64 super_offset); int btrfs_num_copies(struct btrfs_mapping_tree *map_tree, u64 logical, u64 len); int btrfs_bootstrap_super_map(struct btrfs_mapping_tree *map_tree, struct btrfs_fs_devices *fs_devices); struct list_head *btrfs_scanned_uuids(void); int btrfs_add_system_chunk(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_key *key, struct btrfs_chunk *chunk, int item_size); int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset); #endif partclone-0.2.51/src/btrfsclone.c000066400000000000000000000135251200565264100166710ustar00rootroot00000000000000/** * btrfsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read btrfs super block and extent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include "btrfs/version.h" #include "btrfs/ctree.h" #include "btrfs/disk-io.h" #include "btrfs/volumes.h" #include "partclone.h" #include "btrfsclone.h" #include "progress.h" #include "fs_common.h" char *EXECNAME = "partclone.btrfs"; extern fs_cmd_opt fs_opt; struct btrfs_root *root; struct btrfs_path *path; int block_size = 0; ///set useb block static void set_bitmap(unsigned long* bitmap, uint64_t pos, uint64_t length){ uint64_t block; uint64_t pos_block; uint64_t count; pos_block = pos/block_size; count = length/block_size; for(block = pos_block; block < (pos_block+count); block++){ pc_set_bit(block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "block %i is used\n", block); } } /// open device static void fs_open(char* device){ radix_tree_init(); root = open_ctree(device, 0, 0); if(!root){ log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open %s\n", __FILE__, device); } path = btrfs_alloc_path(); } /// close device static void fs_close(){ int ret = 0; btrfs_free_path(path); ret = close_ctree(root); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { uint64_t super_block = 0; struct btrfs_root *extent_root; struct btrfs_extent_item *ei; struct extent_buffer *leaf; struct extent_buffer *eb; struct btrfs_key key; uint64_t bytenr; uint64_t num_bytes; uint64_t length; uint64_t block_offset; int leafsize = 0; struct btrfs_multi_bio *multi = NULL; int ret; int i; fs_open(device); block_size = image_hdr.block_size; //initial all block as free memset(bitmap, 0, sizeof(unsigned long)*LONGS(image_hdr.totalblock)); // set super block and tree as used super_block = BTRFS_SUPER_INFO_OFFSET / block_size; leafsize = btrfs_super_leafsize(&root->fs_info->super_copy); log_mesg(1, 0, 0, fs_opt.debug, "%s: leafsize %i\n", __FILE__, leafsize); log_mesg(1, 0, 0, fs_opt.debug, "%s: super block %i\n", __FILE__, super_block); pc_set_bit(super_block, bitmap); for (i = 1; i < 7; i++) { bytenr = (BTRFS_SUPER_INFO_OFFSET + 1024 * 1024 + leafsize * i ) / block_size; log_mesg(1, 0, 0, fs_opt.debug, "%s: tree block %llu\n", __FILE__, bytenr); pc_set_bit(bytenr, bitmap); } extent_root = root->fs_info->extent_root; bytenr = BTRFS_SUPER_INFO_OFFSET + 4096; key.objectid = bytenr; key.type = BTRFS_EXTENT_ITEM_KEY; key.offset = 0; ret = btrfs_search_slot(NULL, extent_root, &key, path, 0, 0); while(1){ leaf = path->nodes[0]; if (path->slots[0] >= btrfs_header_nritems(leaf)){ ret = btrfs_next_leaf(extent_root, path); if(ret > 0) break; leaf = path->nodes[0]; } btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if(key.objectid < bytenr || key.type != BTRFS_EXTENT_ITEM_KEY){ path->slots[0]++; continue; } bytenr = key.objectid; block_offset = bytenr; num_bytes = key.offset; log_mesg(2, 0, 0, fs_opt.debug, "bytenr = %llu, size = %llu\n", bytenr, num_bytes); if (btrfs_item_size_nr(leaf, path->slots[0]) > sizeof(*ei)) { ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item); if (btrfs_extent_flags(leaf, ei) & BTRFS_EXTENT_FLAG_TREE_BLOCK) { /*disk_io.c*/ eb = btrfs_find_tree_block(root, bytenr, num_bytes); if (eb && btrfs_buffer_uptodate(eb, 0)) { free_extent_buffer(eb); } /*READ=0, mirror=0*/ ret = btrfs_map_block(&root->fs_info->mapping_tree, 0, bytenr, &length, &multi, 0); block_offset = multi->stripes[0].physical; log_mesg(2, 0, 0, fs_opt.debug, "1 bytenr = %llu, size = %llu physical=%llu \n", bytenr, num_bytes, block_offset); set_bitmap(bitmap, block_offset, num_bytes); } else { /*READ=0, mirror=0*/ ret = btrfs_map_block(&root->fs_info->mapping_tree, 0, bytenr, &length, &multi, 0); block_offset = multi->stripes[0].physical; log_mesg(2, 0, 0, fs_opt.debug, "2 bytenr = %llu, size = %llu physical=%llu \n", bytenr, num_bytes, block_offset); set_bitmap(bitmap, block_offset, num_bytes); } } else { /*READ=0, mirror=0*/ ret = btrfs_map_block(&root->fs_info->mapping_tree, 0, bytenr, &length, &multi, 0); block_offset = multi->stripes[0].physical; log_mesg(2, 0, 0, fs_opt.debug, "3 bytenr = %llu, size = %llu physical=%llu \n", bytenr, num_bytes, block_offset); set_bitmap(bitmap, block_offset, num_bytes); } bytenr+=num_bytes; } fs_close(); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, btrfs_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = btrfs_super_nodesize(&root->fs_info->super_copy); image_hdr->usedblocks = (btrfs_super_bytes_used(&root->fs_info->super_copy)/image_hdr->block_size); image_hdr->device_size = btrfs_super_total_bytes(&root->fs_info->super_copy); image_hdr->totalblock = (uint64_t)(image_hdr->device_size/image_hdr->block_size); log_mesg(0, 0, 0, fs_opt.debug, "block_size = %i\n", image_hdr->block_size); log_mesg(0, 0, 0, fs_opt.debug, "usedblock = %lli\n", image_hdr->usedblocks); log_mesg(0, 0, 0, fs_opt.debug, "device_size = %llu\n", image_hdr->device_size); log_mesg(0, 0, 0, fs_opt.debug, "totalblock = %lli\n", image_hdr->totalblock); fs_close(); } partclone-0.2.51/src/btrfsclone.h000066400000000000000000000013441200565264100166720ustar00rootroot00000000000000/** * btrfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read btrfe super block and extent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/chkimg.c000066400000000000000000000325661200565264100160000ustar00rootroot00000000000000/** * The main program of partclone * * Copyright (c) 2007~ Thomas Tsai * * clone/restore partition to a image, device or stdout. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" /** * progress.h - only for progress bar */ #include "progress.h" void *thread_update_pui(void *arg); progress_bar prog; /// progress_bar structure defined in progress.h unsigned long long copied; unsigned long long block_id; int done; /** * partclone.h - include some structures like image_head, opt_cmd, .... * and functions for main used. */ #include "partclone.h" /// global variable cmd_opt opt; /// cmd_opt structure defined in partclone.h char *EXECNAME="partclone.chkimg"; static void usage_chkimg(void) { fprintf(stderr, "%s v%s http://partclone.org\nUsage: %s [OPTIONS]\n" " Efficiently clone to a image, device or standard output.\n" "\n" " -s, --source FILE Source FILE\n" " -L, --logfile FILE Log FILE\n" " -dX, --debug=X Set the debug level to X = [0|1|2]\n" " -C, --no_check Don't check device size and free space\n" #ifdef HAVE_LIBNCURSESW " -N, --ncurses Using Ncurses User Interface\n" #endif " -F, --force force progress\n" " --ignore_crc Ignore crc check error\n" " -B, --no_block_detail Show progress without block detail\n" " -f, --UI-fresh fresh times of progress\n" " -h, --help Display this help\n" , EXECNAME, VERSION, EXECNAME); exit(0); } static void parse_option_chkimg(int argc, char** argv, cmd_opt* option){ static const char *sopt = "-hd::L:s:f:CXFNiB"; static const struct option lopt[] = { { "help", no_argument, NULL, 'h' }, { "source", required_argument, NULL, 's' }, { "debug", optional_argument, NULL, 'd' }, { "UI-fresh", required_argument, NULL, 'u' }, { "check", no_argument, NULL, 'C' }, { "logfile", required_argument, NULL, 'L' }, { "force", no_argument, NULL, 'F' }, { "ignore_crc", no_argument, NULL, 'i' }, { "no_block_detail", no_argument, NULL, 'B' }, #ifdef HAVE_LIBNCURSESW { "ncurses", no_argument, NULL, 'N' }, #endif { NULL, 0, NULL, 0 } }; char c; memset(option, 0, sizeof(cmd_opt)); option->debug = 0; option->check = 1; option->restore = 1; option->chkimg = 1; option->ignore_crc = 0; option->no_block_detail = 0; option->logfile = "/var/log/partclone.log"; while ((c = getopt_long(argc, argv, sopt, lopt, NULL)) != (char)-1) { switch (c) { case 's': option->source = optarg; break; case 'h': usage_chkimg(); break; case '?': usage_chkimg(); break; case 'd': if (optarg) option->debug = atol(optarg); else option->debug = 1; break; case 'L': option->logfile = optarg; break; case 'f': option->fresh = atol(optarg); break; case 'F': option->force++; break; case 'i': option->ignore_crc = 1; break; case 'B': option->no_block_detail = 1; break; #ifdef HAVE_LIBNCURSESW case 'N': option->ncurses = 1; break; #endif case 'C': option->check = 0; break; default: fprintf(stderr, "Unknown option '%s'.\n", argv[optind-1]); usage_chkimg(); } } if (!option->debug){ option->debug = 0; } if (option->source == NULL){ fprintf(stderr, "There is no image name. or --help get more info.\n"); exit(0); } } /** * main functiom - for colne or restore data */ int main(int argc, char **argv){ char* source; /// source data int dfr; /// file descriptor for source and target int r_size; /// read and write size char* buffer; /// buffer data char* buffer2; /// buffer data //unsigned long long block_id, copied = 0; /// block_id is every block in partition /// copied is copied block count off_t offset = 0, sf = 0; /// seek postition, lseek result int start, stop; /// start, range, stop number for progress bar char bitmagic[8] = "BiTmAgIc";// only for check postition char bitmagic_r[8]; /// read magic string from image int cmp; /// compare magic string unsigned long *bitmap; /// the point for bitmap data int debug = 0; /// debug or not unsigned long crc = 0xffffffffL; /// CRC32 check code for writint to image unsigned long crc_ck = 0xffffffffL; /// CRC32 check code for checking unsigned long crc_ck2 = 0xffffffffL; /// CRC32 check code for checking int c_size; /// CRC32 code size //int done = 0; int s_count = 0; int rescue_num = 0; int tui = 0; /// text user interface int pui = 0; /// progress mode(default text) int raw = 0; int flag = 0; char image_hdr_magic[512]; int pres; pthread_t prog_thread; void *p_result; //progress_bar prog; /// progress_bar structure defined in progress.h image_head image_hdr; /// image_head structure defined in partclone.h /** * get option and assign to opt structure * check parameter and read from argv */ parse_option_chkimg(argc, argv, &opt); /** * if "-d / --debug" given * open debug file in "/var/log/partclone.log" for log message */ debug = opt.debug; open_log(opt.logfile); /** * using Text User Interface */ if (opt.ncurses){ pui = NCURSES; log_mesg(1, 0, 0, debug, "Using Ncurses User Interface mode.\n"); } else pui = TEXT; tui = open_pui(pui, opt.fresh); if ((opt.ncurses) && (tui == 0)){ opt.ncurses = 0; log_mesg(1, 0, 0, debug, "Open Ncurses User Interface Error.\n"); } /// print partclone info print_partclone_info(opt); /* if (geteuid() != 0) log_mesg(0, 1, 1, debug, "You are not logged as root. You may have \"access denied\" errors when working.\n"); else log_mesg(1, 0, 0, debug, "UID is root.\n"); */ /// ignore crc check if(opt.ignore_crc) log_mesg(1, 0, 1, debug, "Ignore CRC\n"); /** * open source and target * clone mode, source is device and target is image file/stdout * restore mode, source is image file/stdin and target is device * dd mode, source is device and target is device !!not complete */ #ifdef _FILE_OFFSET_BITS log_mesg(1, 0, 0, debug, "enable _FILE_OFFSET_BITS %i\n", _FILE_OFFSET_BITS); #endif dfr = open_source(opt.source, &opt); if (dfr == -1) { log_mesg(0, 1, 1, debug, "Erro EXIT.\n"); } /** * get partition information like super block, image_head, bitmap * from device or image file. */ log_mesg(1, 0, 0, debug, "Checking image hdr - get image_head from image file\n"); restore_image_hdr(&dfr, &opt, &image_hdr); /// check the image magic if (memcmp(image_hdr.magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE) != 0) log_mesg(0, 1, 1, debug, "The Image magic error. This file is NOT partclone Image\n"); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); if(bitmap == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } log_mesg(2, 0, 0, debug, "initial main bitmap pointer %lli\n", bitmap); log_mesg(1, 0, 0, debug, "Initial image hdr - read bitmap table\n"); /// read and check bitmap from image file log_mesg(0, 0, 1, debug, "Calculating bitmap... "); log_mesg(0, 0, 1, debug, "Please wait... "); get_image_bitmap(&dfr, opt, image_hdr, bitmap); log_mesg(2, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(0, 0, 1, debug, "done!\n"); log_mesg(1, 0, 0, debug, "print image_head\n"); /// print option to log file if (debug) print_opt(opt); /// print image_head print_image_hdr_info(image_hdr, opt); /** * initial progress bar */ start = 0; /// start number of progress bar stop = image_hdr.usedblocks; /// get the end of progress number, only used block log_mesg(1, 0, 0, debug, "Initial Progress bar\n"); /// Initial progress bar if (opt.no_block_detail) flag = NO_BLOCK_DETAIL; else flag = IO; progress_init(&prog, start, stop, image_hdr.totalblock, flag, image_hdr.block_size); copied = 0; /** * thread to print progress */ pres = pthread_create(&prog_thread, NULL, thread_update_pui, NULL); /** * start read and write data between device and image file */ /** * read magic string from image file * and check it. */ r_size = read_all(&dfr, bitmagic_r, 8, &opt); /// read a magic string cmp = memcmp(bitmagic, bitmagic_r, 8); if(cmp != 0) log_mesg(0, 1, 1, debug, "bitmagic error %i\n", cmp); /// start restore image file to partition for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){ r_size = 0; if (pc_test_bit(block_id, bitmap)){ /// The block is used log_mesg(2, 0, 0, debug, "block_id=%lli, ",block_id); log_mesg(1, 0, 0, debug, "bitmap=%i, ",pc_test_bit(block_id, bitmap)); offset = (off_t)(block_id * image_hdr.block_size); buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(1, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size <0) log_mesg(0, 1, 1, debug, "read errno = %i \n", errno); /// read crc32 code and check it. crc_ck = crc32(crc_ck, buffer, r_size); char crc_buffer[CRC_SIZE]; c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt); if (c_size < CRC_SIZE){ log_mesg(0, 0, 1, debug, "read CRC error, please check your image file. \n"); log_mesg(0, 0, 1, debug, "read CRC size (%i), %s. \n", c_size, strerror(errno)); lseek(dfr, (int)(CRC_SIZE-c_size), SEEK_CUR); } if ((memcmp(crc_buffer, &crc_ck, CRC_SIZE) != 0) && (!opt.ignore_crc)){ log_mesg(1, 0, 0, debug, "Ignore_crc 2 %i\n ", opt.ignore_crc); log_mesg(1, 0, 0, debug, "CRC Check error. 64bit bug before v0.1.0 (Rev:250M), enlarge crc size and recheck again....\n "); /// check again buffer2 = (char*)malloc(image_hdr.block_size+CRC_SIZE); ///alloc a memory to copy data if(buffer2 == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } memcpy(buffer2, buffer, image_hdr.block_size); memcpy(buffer2+image_hdr.block_size, crc_buffer, CRC_SIZE); memcpy(buffer, buffer2+CRC_SIZE, image_hdr.block_size); crc_ck2 = crc32(crc_ck2, buffer, r_size); c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt); if (c_size < CRC_SIZE) log_mesg(0, 1, 1, debug, "read CRC error: %s, please check your image file. \n", strerror(errno)); memcpy(&crc, crc_buffer, CRC_SIZE); if ((memcmp(&crc, &crc_ck2, CRC_SIZE) != 0) && (!opt.ignore_crc)){ log_mesg(0, 1, 1, debug, "CRC error again at %i...\n ", sf); } else { crc_ck = crc_ck2; } free(buffer2); } else { crc_ck2 = crc_ck; } /// free buffer free(buffer); copied++; /// count copied block log_mesg(1, 0, 0, debug, "end\n"); } //update_pui(&prog, copied, block_id, done); } // end of for done = 1; pres = pthread_join(prog_thread, &p_result); update_pui(&prog, copied, block_id, done); print_finish_info(opt); close (dfr); /// close source free(bitmap); /// free bitmp close_pui(pui); printf("Checked successfully.\n"); if(opt.debug) close_log(); return 0; /// finish } void *thread_update_pui(void *arg){ while (done == 0) { if(!opt.quiet){ update_pui(&prog, copied, block_id, done); } sleep(opt.fresh); } pthread_exit("exit"); } partclone-0.2.51/src/ddclone.c000066400000000000000000000233211200565264100161330ustar00rootroot00000000000000/** * The main program of partclone * * Copyright (c) 2007~ Thomas Tsai * * clone/restore partition to a image, device or stdout. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * progress.h - only for progress bar */ #include "progress.h" void *thread_update_pui(void *arg); progress_bar prog; /// progress_bar structure defined in progress.h unsigned long long copied; unsigned long long block_id; int done; /** * partclone.h - include some structures like image_head, opt_cmd, .... * and functions for main used. */ #include "partclone.h" /// global variable cmd_opt opt; /// cmd_opt structure defined in partclone.h char *EXECNAME = "partclone.dd"; /** * main functiom - for colne or restore data */ int main(int argc, char **argv){ char* source; /// source data char* target; /// target data char* buffer; /// buffer data for malloc used int dfr, dfw; /// file descriptor for source and target int r_size, w_size; /// read and write size //unsigned long long block_id, copied = 0; /// block_id is every block in partition /// copied is copied block count off_t offset = 0, sf = 0; /// seek postition, lseek result int start, stop; /// start, range, stop number for progress bar unsigned long long total_write = 0; /// the copied size unsigned long long needed_size = 0; /// the copied size unsigned long long needed_mem = 0; /// the copied size char bitmagic[8] = "BiTmAgIc";// only for check postition char bitmagic_r[8]; /// read magic string from image int cmp; /// compare magic string int debug = 0; /// debug or not //int done = 0; int s_count = 0; int rescue_num = 0; unsigned long long rescue_pos = 0; int tui = 0; /// text user interface int pui = 0; /// progress mode(default text) int flag; int pres; pthread_t prog_thread; void *p_result; char *bad_sectors_warning_msg = "*************************************************************************\n" "* WARNING: The disk has bad sector. This means physical damage on the *\n" "* disk surface caused by deterioration, manufacturing faults or other *\n" "* reason. The reliability of the disk may stay stable or degrade fast. *\n" "* Use the --rescue option to efficiently save as much data as possible! *\n" "*************************************************************************\n"; //progress_bar prog; /// progress_bar structure defined in progress.h image_head image_hdr; /// image_head structure defined in partclone.h /** * get option and assign to opt structure * check parameter and read from argv */ parse_options(argc, argv, &opt); /** * if "-d / --debug" given * open debug file in "/var/log/partclone.log" for log message */ debug = opt.debug; //if(opt.debug) open_log(opt.logfile); /** * using Text User Interface */ if (opt.ncurses){ pui = NCURSES; log_mesg(1, 0, 0, debug, "Using Ncurses User Interface mode.\n"); } else pui = TEXT; tui = open_pui(pui, opt.fresh); if ((opt.ncurses) && (tui == 0)){ opt.ncurses = 0; log_mesg(1, 0, 0, debug, "Open Ncurses User Interface Error.\n"); } /// print partclone info print_partclone_info(opt); if (geteuid() != 0) log_mesg(0, 1, 1, debug, "You are not logged as root. You may have \"access denied\" errors when working.\n"); else log_mesg(1, 0, 0, debug, "UID is root.\n"); /** * open source and target * clone mode, source is device and target is image file/stdout * restore mode, source is image file/stdin and target is device * dd mode, source is device and target is device !!not complete */ #ifdef _FILE_OFFSET_BITS log_mesg(1, 0, 0, debug, "enable _FILE_OFFSET_BITS %i\n", _FILE_OFFSET_BITS); #endif source = opt.source; target = opt.target; dfr = open_source(source, &opt); if (dfr == -1) { log_mesg(0, 1, 1, debug, "Erro EXIT.\n"); } dfw = open_target(target, &opt); if (dfw == -1) { log_mesg(0, 1, 1, debug, "Error Exit.\n"); } /** * get partition information like super block, image_head, bitmap * from device or image file. */ log_mesg(1, 0, 0, debug, "Initial image hdr - get Super Block from partition\n"); /// get Super Block information from partition if (dfr != 0) initial_dd_hdr(dfr, &image_hdr); else initial_dd_hdr(dfw, &image_hdr); /// check memory size if (check_mem_size(image_hdr, opt, &needed_mem) == -1) log_mesg(0, 1, 1, debug, "Ther is no enough free memory, partclone suggests you should have %i bytes memory\n", needed_mem); needed_size = (unsigned long long)(((image_hdr.block_size+sizeof(unsigned long))*image_hdr.usedblocks)+sizeof(image_hdr)+sizeof(char)*image_hdr.totalblock); if (opt.check){ if (opt.clone){ check_free_space(&dfw, needed_size); } else { check_size(&dfw, image_hdr.device_size); } } log_mesg(1, 0, 0, debug, "print image_head\n"); /// print option to log file if (debug) print_opt(opt); /// print image_head print_image_hdr_info(image_hdr, opt); /** * initial progress bar */ start = 0; /// start number of progress bar stop = (image_hdr.usedblocks+1); /// get the end of progress number, only used block log_mesg(1, 0, 0, debug, "Initial Progress bar\n"); /// Initial progress bar if (opt.no_block_detail) flag = NO_BLOCK_DETAIL; else flag = IO; progress_init(&prog, start, stop, image_hdr.totalblock, flag, image_hdr.block_size); copied = 0; /// initial number is 0 /** * thread to print progress */ pres = pthread_create(&prog_thread, NULL, thread_update_pui, NULL); /** * start read and write data between device and image file */ /// read data from the first block and log the offset log_mesg(0, 0, 0, debug, "Total block %i\n", image_hdr.totalblock); /// start clone partition to image file block_id = 0; buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } do { r_size = 0; w_size = 0; memset(buffer, 0, image_hdr.block_size); log_mesg(1, 0, 0, debug, "block_id=%lli, ",block_id); /// read data from source to buffer rescue_pos = lseek(dfr, 0, SEEK_CUR); r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(1, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size != (int)image_hdr.block_size){ if ((r_size == -1) && (errno == EIO)){ if (opt.rescue){ r_size = 0; for (rescue_num = 0; rescue_num < image_hdr.block_size; rescue_num += SECTOR_SIZE){ rescue_sector(&dfr, rescue_pos + rescue_num, buffer + rescue_num, &opt); r_size+=SECTOR_SIZE; } }else{ log_mesg(0, 1, 1, debug, "%s", bad_sectors_warning_msg); } }else if (r_size == 0) { //EIO done = 1; }else log_mesg(0, 1, 1, debug, "read error: %s(%i) rsize=%i\n", strerror(errno), errno, r_size); } if (r_size == image_hdr.block_size){ /// write buffer to target w_size = write_all(&dfw, buffer, image_hdr.block_size, &opt); log_mesg(2, 0, 0, debug, "bs=%i and w=%i, ",image_hdr.block_size, w_size); if (w_size != (int)image_hdr.block_size) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); } else if (r_size < image_hdr.block_size){ /// write readed buffer to target w_size = write_all(&dfw, buffer, r_size, &opt); log_mesg(2, 0, 0, debug, "bs=%i and w=%i, ",image_hdr.block_size, w_size); if (w_size != r_size) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); } else { w_size = 0; } copied++; /// count copied block total_write += (unsigned long long)(w_size); /// count copied size log_mesg(1, 0, 0, debug, "total=%lli, ", total_write); /// read or write error if (r_size != w_size) log_mesg(0, 1, 1, debug, "read(%i) and write(%i) different\n", r_size, w_size); log_mesg(1, 0, 0, debug, "end\n"); block_id++; //if (!opt.quiet) //update_pui(&prog, copied, block_id, done); } while (done == 0);/// end of for pres = pthread_join(prog_thread, &p_result); update_pui(&prog, copied, block_id, done); sync_data(dfw, &opt); /// free buffer free(buffer); print_finish_info(opt); close (dfr); /// close source close (dfw); /// close target close_pui(pui); /// close target printf("Cloned successfully.\n"); if(opt.debug) close_log(); return 0; /// finish } void *thread_update_pui(void *arg){ while (done == 0) { if(!opt.quiet){ update_pui(&prog, copied, block_id, done); } sleep(opt.fresh); } pthread_exit("exit"); } partclone-0.2.51/src/deplib_version.c000066400000000000000000000033141200565264100175270ustar00rootroot00000000000000#include #ifdef EXTFS #include #elif REISERFS #include #elif REISER4 #include #elif XFS #elif HFSPLUS #elif FAT #elif NTFS #include #elif VMFS #include #endif int main(int argc, char **argv){ char *libfs; int err=0; if(argv[1]){ libfs = argv[1]; } else { libfs="xxx"; } //printf("%s\n", libfs); if (strcmp(libfs, "ntfs") == 0){ err = libntfs_version(); } else if (strcmp(libfs, "extfs") == 0) { err = libextfs_version(); } else if (strcmp(libfs, "reiserfs") == 0) { err = libreiserfs_version(); } else if (strcmp(libfs, "vmfs") == 0) { err = libvmfs_version(); } else if (strcmp(libfs, "reiser4") == 0) { err = libpreiser4_version(); } if(err == 1){ printf("0\n"); } return 0; } int libvmfs_version(){ #ifdef VMFS char *version; version = "0.2.0"; #ifdef VMFS5_ZLA_BASE version = "0.2.5"; #endif printf("%s\n", version); #endif } int libntfs_version(){ #ifdef NTFS printf("%s\n", ntfs_libntfs_version()); return 0; #endif return 1; } int libextfs_version(){ #ifdef EXTFS const char *lib_ver; ext2fs_get_library_version(&lib_ver, 0); printf("%s\n", lib_ver); return 0; #endif return 1; } int libpreiser4_version(){ #ifdef REISER4 const char *lib_ver; lib_ver = (const char *)libreiser4_version(); printf("%s\n", lib_ver); return 0; #endif return 1; } int libreiserfs_version(){ #ifdef REISERFS const char *lib_ver; lib_ver = (const char *)libreiserfs_get_version(); printf("%s\n", lib_ver); return 0; #endif return 1; } partclone-0.2.51/src/exfat/000077500000000000000000000000001200565264100154655ustar00rootroot00000000000000partclone-0.2.51/src/exfat/byteorder.h000066400000000000000000000063761200565264100176510ustar00rootroot00000000000000/* byteorder.h (12.01.10) Endianness stuff. exFAT uses little-endian byte order. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef BYTEORDER_H_INCLUDED #define BYTEORDER_H_INCLUDED #include #if defined(__GLIBC__) #include #include #elif defined(__APPLE__) #include #include #define bswap_16(x) OSSwapInt16(x) #define bswap_32(x) OSSwapInt32(x) #define bswap_64(x) OSSwapInt64(x) #define __BYTE_ORDER BYTE_ORDER #define __LITTLE_ENDIAN LITTLE_ENDIAN #define __BIG_ENDIAN BIG_ENDIAN #elif defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__) #include #define bswap_16(x) bswap16(x) #define bswap_32(x) bswap32(x) #define bswap_64(x) bswap64(x) #define __BYTE_ORDER _BYTE_ORDER #define __LITTLE_ENDIAN _LITTLE_ENDIAN #define __BIG_ENDIAN _BIG_ENDIAN #elif defined(__OpenBSD__) #include #define bswap_16(x) swap16(x) #define bswap_32(x) swap32(x) #define bswap_64(x) swap64(x) #define __BYTE_ORDER _BYTE_ORDER #define __LITTLE_ENDIAN _LITTLE_ENDIAN #define __BIG_ENDIAN _BIG_ENDIAN #elif defined(__sun) #include #define bswap_16(x) BSWAP_16(x) #define bswap_32(x) BSWAP_32(x) #define bswap_64(x) BSWAP_64(x) #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #ifdef _LITTLE_ENDIAN #define __BYTE_ORDER __LITTLE_ENDIAN #else #define __BYTE_ORDER __BIG_ENDIAN #endif #else #error No byte order macros available for your platform #endif typedef struct { uint16_t __u16; } le16_t; typedef struct { uint32_t __u32; } le32_t; typedef struct { uint64_t __u64; } le64_t; #if __BYTE_ORDER == __LITTLE_ENDIAN static inline uint16_t le16_to_cpu(le16_t v) { return v.__u16; } static inline uint32_t le32_to_cpu(le32_t v) { return v.__u32; } static inline uint64_t le64_to_cpu(le64_t v) { return v.__u64; } static inline le16_t cpu_to_le16(uint16_t v) { le16_t t = {v}; return t; } static inline le32_t cpu_to_le32(uint32_t v) { le32_t t = {v}; return t; } static inline le64_t cpu_to_le64(uint64_t v) { le64_t t = {v}; return t; } #elif __BYTE_ORDER == __BIG_ENDIAN static inline uint16_t le16_to_cpu(le16_t v) { return bswap_16(v.__u16); } static inline uint32_t le32_to_cpu(le32_t v) { return bswap_32(v.__u32); } static inline uint64_t le64_to_cpu(le64_t v) { return bswap_64(v.__u64); } static inline le16_t cpu_to_le16(uint16_t v) { le16_t t = {bswap_16(v)}; return t; } static inline le32_t cpu_to_le32(uint32_t v) { le32_t t = {bswap_32(v)}; return t; } static inline le64_t cpu_to_le64(uint64_t v) { le64_t t = {bswap_64(v)}; return t; } #else #error Wow! You have a PDP machine?! #endif #endif /* ifndef BYTEORDER_H_INCLUDED */ partclone-0.2.51/src/exfat/cluster.c000066400000000000000000000254341200565264100173220ustar00rootroot00000000000000/* cluster.c (03.09.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include #include /* * Sector to absolute offset. */ static off_t s2o(const struct exfat* ef, off_t sector) { return sector << ef->sb->sector_bits; } /* * Cluster to sector. */ static off_t c2s(const struct exfat* ef, cluster_t cluster) { if (cluster < EXFAT_FIRST_DATA_CLUSTER) exfat_bug("invalid cluster number %u", cluster); return le32_to_cpu(ef->sb->cluster_sector_start) + ((off_t) (cluster - EXFAT_FIRST_DATA_CLUSTER) << ef->sb->spc_bits); } /* * Cluster to absolute offset. */ off_t exfat_c2o(const struct exfat* ef, cluster_t cluster) { return s2o(ef, c2s(ef, cluster)); } /* * Sector to cluster. */ static cluster_t s2c(const struct exfat* ef, off_t sector) { return ((sector - le32_to_cpu(ef->sb->cluster_sector_start)) >> ef->sb->spc_bits) + EXFAT_FIRST_DATA_CLUSTER; } /* * Size in bytes to size in clusters (rounded upwards). */ static uint32_t bytes2clusters(const struct exfat* ef, uint64_t bytes) { uint64_t cluster_size = CLUSTER_SIZE(*ef->sb); return (bytes + cluster_size - 1) / cluster_size; } cluster_t exfat_next_cluster(const struct exfat* ef, const struct exfat_node* node, cluster_t cluster) { le32_t next; off_t fat_offset; if (cluster < EXFAT_FIRST_DATA_CLUSTER) exfat_bug("bad cluster 0x%x", cluster); if (IS_CONTIGUOUS(*node)) return cluster + 1; fat_offset = s2o(ef, le32_to_cpu(ef->sb->fat_sector_start)) + cluster * sizeof(cluster_t); exfat_pread(ef->dev, &next, sizeof(next), fat_offset); return le32_to_cpu(next); } cluster_t exfat_advance_cluster(const struct exfat* ef, struct exfat_node* node, uint32_t count) { uint32_t i; if (node->fptr_index > count) { node->fptr_index = 0; node->fptr_cluster = node->start_cluster; } for (i = node->fptr_index; i < count; i++) { node->fptr_cluster = exfat_next_cluster(ef, node, node->fptr_cluster); if (CLUSTER_INVALID(node->fptr_cluster)) break; } node->fptr_index = count; return node->fptr_cluster; } static cluster_t find_bit_and_set(uint8_t* bitmap, cluster_t start, cluster_t end) { const cluster_t mid_start = (start + 7) / 8 * 8; const cluster_t mid_end = end / 8 * 8; cluster_t c; cluster_t byte; for (c = start; c < mid_start; c++) if (BMAP_GET(bitmap, c) == 0) { BMAP_SET(bitmap, c); return c + EXFAT_FIRST_DATA_CLUSTER; } for (byte = mid_start / 8; byte < mid_end / 8; byte++) if (bitmap[byte] != 0xff) { cluster_t bit; for (bit = 0; bit < 8; bit++) if (!(bitmap[byte] & (1u << bit))) { bitmap[byte] |= (1u << bit); return byte * 8 + bit + EXFAT_FIRST_DATA_CLUSTER; } } for (c = mid_end; c < end; c++) if (BMAP_GET(bitmap, c) == 0) { BMAP_SET(bitmap, c); return c + EXFAT_FIRST_DATA_CLUSTER; } return EXFAT_CLUSTER_END; } void exfat_flush_cmap(struct exfat* ef) { exfat_pwrite(ef->dev, ef->cmap.chunk, (ef->cmap.chunk_size + 7) / 8, exfat_c2o(ef, ef->cmap.start_cluster)); ef->cmap.dirty = 0; } static void set_next_cluster(const struct exfat* ef, int contiguous, cluster_t current, cluster_t next) { off_t fat_offset; le32_t next_le32; if (contiguous) return; fat_offset = s2o(ef, le32_to_cpu(ef->sb->fat_sector_start)) + current * sizeof(cluster_t); next_le32 = cpu_to_le32(next); exfat_pwrite(ef->dev, &next_le32, sizeof(next_le32), fat_offset); } static cluster_t allocate_cluster(struct exfat* ef, cluster_t hint) { cluster_t cluster; hint -= EXFAT_FIRST_DATA_CLUSTER; if (hint >= ef->cmap.chunk_size) hint = 0; cluster = find_bit_and_set(ef->cmap.chunk, hint, ef->cmap.chunk_size); if (cluster == EXFAT_CLUSTER_END) cluster = find_bit_and_set(ef->cmap.chunk, 0, hint); if (cluster == EXFAT_CLUSTER_END) { exfat_error("no free space left"); return EXFAT_CLUSTER_END; } ef->cmap.dirty = 1; return cluster; } static void free_cluster(struct exfat* ef, cluster_t cluster) { if (CLUSTER_INVALID(cluster)) exfat_bug("attempting to free invalid cluster"); if (cluster < EXFAT_FIRST_DATA_CLUSTER || cluster - EXFAT_FIRST_DATA_CLUSTER >= ef->cmap.size) exfat_bug("bad cluster 0x%x (0x%x)", cluster, ef->cmap.size); BMAP_CLR(ef->cmap.chunk, cluster - EXFAT_FIRST_DATA_CLUSTER); ef->cmap.dirty = 1; } static void make_noncontiguous(const struct exfat* ef, cluster_t first, cluster_t last) { cluster_t c; for (c = first; c < last; c++) set_next_cluster(ef, 0, c, c + 1); } static int shrink_file(struct exfat* ef, struct exfat_node* node, uint32_t current, uint32_t difference); static int grow_file(struct exfat* ef, struct exfat_node* node, uint32_t current, uint32_t difference) { cluster_t previous; cluster_t next; uint32_t allocated = 0; if (difference == 0) exfat_bug("zero clusters count passed"); if (node->start_cluster != EXFAT_CLUSTER_FREE) { /* get the last cluster of the file */ previous = exfat_advance_cluster(ef, node, current - 1); if (CLUSTER_INVALID(previous)) { exfat_error("invalid cluster in file"); return -EIO; } } else { if (node->fptr_index != 0) exfat_bug("non-zero pointer index (%u)", node->fptr_index); /* file does not have clusters (i.e. is empty), allocate the first one for it */ previous = allocate_cluster(ef, 0); if (CLUSTER_INVALID(previous)) return -ENOSPC; node->fptr_cluster = node->start_cluster = previous; allocated = 1; /* file consists of only one cluster, so it's contiguous */ node->flags |= EXFAT_ATTRIB_CONTIGUOUS; } while (allocated < difference) { next = allocate_cluster(ef, previous + 1); if (CLUSTER_INVALID(next)) { if (allocated != 0) shrink_file(ef, node, current + allocated, allocated); return -ENOSPC; } if (next != previous - 1 && IS_CONTIGUOUS(*node)) { /* it's a pity, but we are not able to keep the file contiguous anymore */ make_noncontiguous(ef, node->start_cluster, previous); node->flags &= ~EXFAT_ATTRIB_CONTIGUOUS; node->flags |= EXFAT_ATTRIB_DIRTY; } set_next_cluster(ef, IS_CONTIGUOUS(*node), previous, next); previous = next; allocated++; } set_next_cluster(ef, IS_CONTIGUOUS(*node), previous, EXFAT_CLUSTER_END); return 0; } static int shrink_file(struct exfat* ef, struct exfat_node* node, uint32_t current, uint32_t difference) { cluster_t previous; cluster_t next; if (difference == 0) exfat_bug("zero difference passed"); if (node->start_cluster == EXFAT_CLUSTER_FREE) exfat_bug("unable to shrink empty file (%u clusters)", current); if (current < difference) exfat_bug("file underflow (%u < %u)", current, difference); /* crop the file */ if (current > difference) { cluster_t last = exfat_advance_cluster(ef, node, current - difference - 1); if (CLUSTER_INVALID(last)) { exfat_error("invalid cluster in file"); return -EIO; } previous = exfat_next_cluster(ef, node, last); set_next_cluster(ef, IS_CONTIGUOUS(*node), last, EXFAT_CLUSTER_END); } else { previous = node->start_cluster; node->start_cluster = EXFAT_CLUSTER_FREE; } node->fptr_index = 0; node->fptr_cluster = node->start_cluster; /* free remaining clusters */ while (difference--) { if (CLUSTER_INVALID(previous)) { exfat_error("invalid cluster in file"); return -EIO; } next = exfat_next_cluster(ef, node, previous); set_next_cluster(ef, IS_CONTIGUOUS(*node), previous, EXFAT_CLUSTER_FREE); free_cluster(ef, previous); previous = next; } return 0; } static void erase_raw(struct exfat* ef, size_t size, off_t offset) { exfat_pwrite(ef->dev, ef->zero_cluster, size, offset); } static int erase_range(struct exfat* ef, struct exfat_node* node, uint64_t begin, uint64_t end) { uint64_t cluster_boundary; cluster_t cluster; if (begin >= end) return 0; cluster_boundary = (begin | (CLUSTER_SIZE(*ef->sb) - 1)) + 1; cluster = exfat_advance_cluster(ef, node, begin / CLUSTER_SIZE(*ef->sb)); if (CLUSTER_INVALID(cluster)) { exfat_error("invalid cluster in file"); return -EIO; } /* erase from the beginning to the closest cluster boundary */ erase_raw(ef, MIN(cluster_boundary, end) - begin, exfat_c2o(ef, cluster) + begin % CLUSTER_SIZE(*ef->sb)); /* erase whole clusters */ while (cluster_boundary < end) { cluster = exfat_next_cluster(ef, node, cluster); /* the cluster cannot be invalid because we have just allocated it */ if (CLUSTER_INVALID(cluster)) exfat_bug("invalid cluster in file"); erase_raw(ef, CLUSTER_SIZE(*ef->sb), exfat_c2o(ef, cluster)); cluster_boundary += CLUSTER_SIZE(*ef->sb); } return 0; } int exfat_truncate(struct exfat* ef, struct exfat_node* node, uint64_t size) { uint32_t c1 = bytes2clusters(ef, node->size); uint32_t c2 = bytes2clusters(ef, size); int rc = 0; if (node->references == 0 && node->parent) exfat_bug("no references, node changes can be lost"); if (node->size == size) return 0; if (c1 < c2) rc = grow_file(ef, node, c1, c2 - c1); else if (c1 > c2) rc = shrink_file(ef, node, c1, c1 - c2); if (rc != 0) return rc; rc = erase_range(ef, node, node->size, size); if (rc != 0) return rc; exfat_update_mtime(node); node->size = size; node->flags |= EXFAT_ATTRIB_DIRTY; return 0; } uint32_t exfat_count_free_clusters(const struct exfat* ef) { uint32_t free_clusters = 0; uint32_t i; for (i = 0; i < ef->cmap.size; i++) if (BMAP_GET(ef->cmap.chunk, i) == 0) free_clusters++; return free_clusters; } static int find_used_clusters(const struct exfat* ef, cluster_t* a, cluster_t* b) { const cluster_t end = le32_to_cpu(ef->sb->cluster_count); /* find first used cluster */ for (*a = *b + 1; *a < end; (*a)++) if (BMAP_GET(ef->cmap.chunk, *a - EXFAT_FIRST_DATA_CLUSTER)) break; if (*a >= end) return 1; /* find last contiguous used cluster */ for (*b = *a; *b < end; (*b)++) if (BMAP_GET(ef->cmap.chunk, *b - EXFAT_FIRST_DATA_CLUSTER) == 0) { (*b)--; break; } return 0; } int exfat_find_used_sectors(const struct exfat* ef, off_t* a, off_t* b) { cluster_t ca, cb; if (*a == 0 && *b == 0) ca = cb = EXFAT_FIRST_DATA_CLUSTER - 1; else { ca = s2c(ef, *a); cb = s2c(ef, *b); } if (find_used_clusters(ef, &ca, &cb) != 0) return 1; if (*a != 0 || *b != 0) *a = c2s(ef, ca); *b = c2s(ef, cb) + (CLUSTER_SIZE(*ef->sb) - 1) / SECTOR_SIZE(*ef->sb); return 0; } partclone-0.2.51/src/exfat/exfat.h000066400000000000000000000160251200565264100167510ustar00rootroot00000000000000/* exfat.h (29.08.09) Definitions of structures and constants used in exFAT file system implementation. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef EXFAT_H_INCLUDED #define EXFAT_H_INCLUDED #include #include #include #include #include #include "exfatfs.h" #include "version.h" #define EXFAT_NAME_MAX 256 #define EXFAT_ATTRIB_CONTIGUOUS 0x10000 #define EXFAT_ATTRIB_CACHED 0x20000 #define EXFAT_ATTRIB_DIRTY 0x40000 #define EXFAT_ATTRIB_UNLINKED 0x80000 #define IS_CONTIGUOUS(node) (((node).flags & EXFAT_ATTRIB_CONTIGUOUS) != 0) #define SECTOR_SIZE(sb) (1 << (sb).sector_bits) #define CLUSTER_SIZE(sb) (SECTOR_SIZE(sb) << (sb).spc_bits) #define CLUSTER_INVALID(c) ((c) == EXFAT_CLUSTER_BAD || (c) == EXFAT_CLUSTER_END) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define DIV_ROUND_UP(x, d) (((x) + (d) - 1) / (d)) #define BMAP_GET(bitmap, index) \ (((uint8_t*) bitmap)[(index) / 8] & (1u << ((index) % 8))) #define BMAP_SET(bitmap, index) \ ((uint8_t*) bitmap)[(index) / 8] |= (1u << ((index) % 8)) #define BMAP_CLR(bitmap, index) \ ((uint8_t*) bitmap)[(index) / 8] &= ~(1u << ((index) % 8)) struct exfat_node { struct exfat_node* parent; struct exfat_node* child; struct exfat_node* next; struct exfat_node* prev; int references; uint32_t fptr_index; cluster_t fptr_cluster; cluster_t entry_cluster; off_t entry_offset; cluster_t start_cluster; int flags; uint64_t size; time_t mtime, atime; le16_t name[EXFAT_NAME_MAX + 1]; }; struct exfat_dev; struct exfat { struct exfat_dev* dev; struct exfat_super_block* sb; le16_t* upcase; size_t upcase_chars; struct exfat_node* root; struct { cluster_t start_cluster; uint32_t size; /* in bits */ uint8_t* chunk; uint32_t chunk_size; /* in bits */ int dirty; } cmap; char label[EXFAT_ENAME_MAX * 6 + 1]; /* a character can occupy up to 6 bytes in UTF-8 */ void* zero_cluster; int dmask, fmask; uid_t uid; gid_t gid; int ro; int ro_fallback; int noatime; }; /* in-core nodes iterator */ struct exfat_iterator { struct exfat_node* parent; struct exfat_node* current; }; struct exfat_human_bytes { uint64_t value; const char* unit; }; extern int exfat_errors; void exfat_bug(const char* format, ...) __attribute__((format(printf, 1, 2), noreturn)); void exfat_error(const char* format, ...) __attribute__((format(printf, 1, 2))); void exfat_warn(const char* format, ...) __attribute__((format(printf, 1, 2))); void exfat_debug(const char* format, ...) __attribute__((format(printf, 1, 2))); struct exfat_dev* exfat_open(const char* spec, int ro); int exfat_close(struct exfat_dev* dev); int exfat_fsync(struct exfat_dev* dev); off_t exfat_seek(struct exfat_dev* dev, off_t offset, int whence); ssize_t exfat_read(struct exfat_dev* dev, void* buffer, size_t size); ssize_t exfat_write(struct exfat_dev* dev, const void* buffer, size_t size); void exfat_pread(struct exfat_dev* dev, void* buffer, size_t size, off_t offset); void exfat_pwrite(struct exfat_dev* dev, const void* buffer, size_t size, off_t offset); ssize_t exfat_generic_pread(const struct exfat* ef, struct exfat_node* node, void* buffer, size_t size, off_t offset); ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node, const void* buffer, size_t size, off_t offset); int exfat_opendir(struct exfat* ef, struct exfat_node* dir, struct exfat_iterator* it); void exfat_closedir(struct exfat* ef, struct exfat_iterator* it); struct exfat_node* exfat_readdir(struct exfat* ef, struct exfat_iterator* it); int exfat_lookup(struct exfat* ef, struct exfat_node** node, const char* path); int exfat_split(struct exfat* ef, struct exfat_node** parent, struct exfat_node** node, le16_t* name, const char* path); off_t exfat_c2o(const struct exfat* ef, cluster_t cluster); cluster_t exfat_next_cluster(const struct exfat* ef, const struct exfat_node* node, cluster_t cluster); cluster_t exfat_advance_cluster(const struct exfat* ef, struct exfat_node* node, uint32_t count); void exfat_flush_cmap(struct exfat* ef); int exfat_truncate(struct exfat* ef, struct exfat_node* node, uint64_t size); uint32_t exfat_count_free_clusters(const struct exfat* ef); int exfat_find_used_sectors(const struct exfat* ef, off_t* a, off_t* b); void exfat_stat(const struct exfat* ef, const struct exfat_node* node, struct stat* stbuf); void exfat_get_name(const struct exfat_node* node, char* buffer, size_t n); uint16_t exfat_start_checksum(const struct exfat_entry_meta1* entry); uint16_t exfat_add_checksum(const void* entry, uint16_t sum); le16_t exfat_calc_checksum(const struct exfat_entry_meta1* meta1, const struct exfat_entry_meta2* meta2, const le16_t* name); uint32_t exfat_vbr_start_checksum(const void* sector, size_t size); uint32_t exfat_vbr_add_checksum(const void* sector, size_t size, uint32_t sum); le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name); void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb); void exfat_print_info(const struct exfat_super_block* sb, uint32_t free_clusters); int utf16_to_utf8(char* output, const le16_t* input, size_t outsize, size_t insize); int utf8_to_utf16(le16_t* output, const char* input, size_t outsize, size_t insize); size_t utf16_length(const le16_t* str); struct exfat_node* exfat_get_node(struct exfat_node* node); void exfat_put_node(struct exfat* ef, struct exfat_node* node); int exfat_cache_directory(struct exfat* ef, struct exfat_node* dir); void exfat_reset_cache(struct exfat* ef); void exfat_flush_node(struct exfat* ef, struct exfat_node* node); int exfat_unlink(struct exfat* ef, struct exfat_node* node); int exfat_rmdir(struct exfat* ef, struct exfat_node* node); int exfat_mknod(struct exfat* ef, const char* path); int exfat_mkdir(struct exfat* ef, const char* path); int exfat_rename(struct exfat* ef, const char* old_path, const char* new_path); void exfat_utimes(struct exfat_node* node, const struct timespec tv[2]); void exfat_update_atime(struct exfat_node* node); void exfat_update_mtime(struct exfat_node* node); const char* exfat_get_label(struct exfat* ef); int exfat_set_label(struct exfat* ef, const char* label); int exfat_mount(struct exfat* ef, const char* spec, const char* options); void exfat_unmount(struct exfat* ef); time_t exfat_exfat2unix(le16_t date, le16_t time, uint8_t centisec); void exfat_unix2exfat(time_t unix_time, le16_t* date, le16_t* time, uint8_t* centisec); void exfat_tzset(void); #endif /* ifndef EXFAT_H_INCLUDED */ partclone-0.2.51/src/exfat/exfatfs.h000066400000000000000000000122261200565264100173010ustar00rootroot00000000000000/* exfatfs.h (29.08.09) Definitions of structures and constants used in exFAT file system. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef EXFATFS_H_INCLUDED #define EXFATFS_H_INCLUDED #include "byteorder.h" typedef uint32_t cluster_t; /* cluster number */ #define EXFAT_FIRST_DATA_CLUSTER 2 #define EXFAT_CLUSTER_FREE 0 /* free cluster */ #define EXFAT_CLUSTER_BAD 0xfffffff7 /* cluster contains bad sector */ #define EXFAT_CLUSTER_END 0xffffffff /* final cluster of file or directory */ #define EXFAT_STATE_MOUNTED 2 struct exfat_super_block { uint8_t jump[3]; /* 0x00 jmp and nop instructions */ uint8_t oem_name[8]; /* 0x03 "EXFAT " */ uint8_t __unused1[53]; /* 0x0B always 0 */ le64_t sector_start; /* 0x40 partition first sector */ le64_t sector_count; /* 0x48 partition sectors count */ le32_t fat_sector_start; /* 0x50 FAT first sector */ le32_t fat_sector_count; /* 0x54 FAT sectors count */ le32_t cluster_sector_start; /* 0x58 first cluster sector */ le32_t cluster_count; /* 0x5C total clusters count */ le32_t rootdir_cluster; /* 0x60 first cluster of the root dir */ le32_t volume_serial; /* 0x64 volume serial number */ struct /* 0x68 FS version */ { uint8_t minor; uint8_t major; } version; le16_t volume_state; /* 0x6A volume state flags */ uint8_t sector_bits; /* 0x6C sector size as (1 << n) */ uint8_t spc_bits; /* 0x6D sectors per cluster as (1 << n) */ uint8_t fat_count; /* 0x6E always 1 */ uint8_t drive_no; /* 0x6F always 0x80 */ uint8_t allocated_percent; /* 0x70 percentage of allocated space */ uint8_t __unused2[397]; /* 0x71 always 0 */ le16_t boot_signature; /* the value of 0xAA55 */ } __attribute__((__packed__)); #define EXFAT_ENTRY_VALID 0x80 #define EXFAT_ENTRY_CONTINUED 0x40 #define EXFAT_ENTRY_BITMAP (0x01 | EXFAT_ENTRY_VALID) #define EXFAT_ENTRY_UPCASE (0x02 | EXFAT_ENTRY_VALID) #define EXFAT_ENTRY_LABEL (0x03 | EXFAT_ENTRY_VALID) #define EXFAT_ENTRY_FILE (0x05 | EXFAT_ENTRY_VALID) #define EXFAT_ENTRY_FILE_INFO (0x00 | EXFAT_ENTRY_VALID | EXFAT_ENTRY_CONTINUED) #define EXFAT_ENTRY_FILE_NAME (0x01 | EXFAT_ENTRY_VALID | EXFAT_ENTRY_CONTINUED) struct exfat_entry /* common container for all entries */ { uint8_t type; /* any of EXFAT_ENTRY_xxx */ uint8_t data[31]; } __attribute__((__packed__)); #define EXFAT_ENAME_MAX 15 struct exfat_entry_bitmap /* allocated clusters bitmap */ { uint8_t type; /* EXFAT_ENTRY_BITMAP */ uint8_t __unknown1[19]; le32_t start_cluster; le64_t size; /* in bytes */ } __attribute__((__packed__)); struct exfat_entry_upcase /* upper case translation table */ { uint8_t type; /* EXFAT_ENTRY_UPCASE */ uint8_t __unknown1[3]; le32_t checksum; uint8_t __unknown2[12]; le32_t start_cluster; le64_t size; /* in bytes */ } __attribute__((__packed__)); struct exfat_entry_label /* volume label */ { uint8_t type; /* EXFAT_ENTRY_LABEL */ uint8_t length; /* number of characters */ le16_t name[EXFAT_ENAME_MAX]; /* in UTF-16LE */ } __attribute__((__packed__)); #define EXFAT_ATTRIB_RO 0x01 #define EXFAT_ATTRIB_HIDDEN 0x02 #define EXFAT_ATTRIB_SYSTEM 0x04 #define EXFAT_ATTRIB_VOLUME 0x08 #define EXFAT_ATTRIB_DIR 0x10 #define EXFAT_ATTRIB_ARCH 0x20 struct exfat_entry_meta1 /* file or directory info (part 1) */ { uint8_t type; /* EXFAT_ENTRY_FILE */ uint8_t continuations; le16_t checksum; le16_t attrib; /* combination of EXFAT_ATTRIB_xxx */ le16_t __unknown1; le16_t crtime, crdate; /* creation date and time */ le16_t mtime, mdate; /* latest modification date and time */ le16_t atime, adate; /* latest access date and time */ uint8_t crtime_cs; /* creation time in cs (centiseconds) */ uint8_t mtime_cs; /* latest modification time in cs */ uint8_t __unknown2[10]; } __attribute__((__packed__)); #define EXFAT_FLAG_ALWAYS1 (1u << 0) #define EXFAT_FLAG_CONTIGUOUS (1u << 1) struct exfat_entry_meta2 /* file or directory info (part 2) */ { uint8_t type; /* EXFAT_ENTRY_FILE_INFO */ uint8_t flags; /* combination of EXFAT_FLAG_xxx */ uint8_t __unknown1; uint8_t name_length; le16_t name_hash; le16_t __unknown2; le64_t real_size; /* in bytes, equals to size */ uint8_t __unknown3[4]; le32_t start_cluster; le64_t size; /* in bytes, equals to real_size */ } __attribute__((__packed__)); struct exfat_entry_name /* file or directory name */ { uint8_t type; /* EXFAT_ENTRY_FILE_NAME */ uint8_t __unknown; le16_t name[EXFAT_ENAME_MAX]; /* in UTF-16LE */ } __attribute__((__packed__)); #endif /* ifndef EXFATFS_H_INCLUDED */ partclone-0.2.51/src/exfat/io.c000066400000000000000000000140701200565264100162420ustar00rootroot00000000000000/* io.c (02.09.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #define _XOPEN_SOURCE 500 /* for pread() and pwrite() in Linux */ #include "exfat.h" #include #include #include #include #include #include #include #ifdef USE_UBLIO #include #include #endif #if _FILE_OFFSET_BITS != 64 #error You should define _FILE_OFFSET_BITS=64 #endif struct exfat_dev { int fd; #ifdef USE_UBLIO off_t pos; ublio_filehandle_t ufh; #endif }; struct exfat_dev* exfat_open(const char* spec, int ro) { struct exfat_dev* dev; struct stat stbuf; #ifdef USE_UBLIO struct ublio_param up; #endif dev = malloc(sizeof(struct exfat_dev)); if (dev == NULL) { exfat_error("failed to allocate memory for device structure"); return NULL; } dev->fd = open(spec, ro ? O_RDONLY : O_RDWR); if (dev->fd < 0) { free(dev); exfat_error("failed to open `%s' in read-%s mode", spec, ro ? "only" : "write"); return NULL; } if (fstat(dev->fd, &stbuf) != 0) { close(dev->fd); free(dev); exfat_error("failed to fstat `%s'", spec); return NULL; } if (!S_ISBLK(stbuf.st_mode) && !S_ISCHR(stbuf.st_mode) && !S_ISREG(stbuf.st_mode)) { close(dev->fd); free(dev); exfat_error("`%s' is neither a device, nor a regular file", spec); return NULL; } #ifdef USE_UBLIO memset(&up, 0, sizeof(struct ublio_param)); up.up_blocksize = 256 * 1024; up.up_items = 64; up.up_grace = 32; up.up_priv = &dev->fd; dev->pos = 0; dev->ufh = ublio_open(&up); if (dev->ufh == NULL) { close(dev->fd); free(dev); exfat_error("failed to initialize ublio"); return NULL; } #endif return dev; } int exfat_close(struct exfat_dev* dev) { #ifdef USE_UBLIO if (ublio_close(dev->ufh) != 0) exfat_error("failed to close ublio"); #endif if (close(dev->fd) != 0) { free(dev); exfat_error("failed to close device"); return 1; } free(dev); return 0; } int exfat_fsync(struct exfat_dev* dev) { #ifdef USE_UBLIO if (ublio_fsync(dev->ufh) != 0) #else if (fsync(dev->fd) != 0) #endif { exfat_error("fsync failed"); return 1; } return 0; } off_t exfat_seek(struct exfat_dev* dev, off_t offset, int whence) { #ifdef USE_UBLIO /* XXX SEEK_CUR will be handled incorrectly */ return dev->pos = lseek(dev->fd, offset, whence); #else return lseek(dev->fd, offset, whence); #endif } ssize_t exfat_read(struct exfat_dev* dev, void* buffer, size_t size) { #ifdef USE_UBLIO ssize_t result = ublio_pread(dev->ufh, buffer, size, dev->pos); if (result >= 0) dev->pos += size; return result; #else return read(dev->fd, buffer, size); #endif } ssize_t exfat_write(struct exfat_dev* dev, const void* buffer, size_t size) { #ifdef USE_UBLIO ssize_t result = ublio_pwrite(dev->ufh, buffer, size, dev->pos); if (result >= 0) dev->pos += size; return result; #else return write(dev->fd, buffer, size); #endif } void exfat_pread(struct exfat_dev* dev, void* buffer, size_t size, off_t offset) { #ifdef USE_UBLIO if (ublio_pread(dev->ufh, buffer, size, offset) != size) #else if (pread(dev->fd, buffer, size, offset) != size) #endif exfat_bug("failed to read %zu bytes from file at %"PRIu64, size, (uint64_t) offset); } void exfat_pwrite(struct exfat_dev* dev, const void* buffer, size_t size, off_t offset) { #ifdef USE_UBLIO if (ublio_pwrite(dev->ufh, buffer, size, offset) != size) #else if (pwrite(dev->fd, buffer, size, offset) != size) #endif exfat_bug("failed to write %zu bytes to file at %"PRIu64, size, (uint64_t) offset); } ssize_t exfat_generic_pread(const struct exfat* ef, struct exfat_node* node, void* buffer, size_t size, off_t offset) { cluster_t cluster; char* bufp = buffer; off_t lsize, loffset, remainder; if (offset >= node->size) return 0; if (size == 0) return 0; cluster = exfat_advance_cluster(ef, node, offset / CLUSTER_SIZE(*ef->sb)); if (CLUSTER_INVALID(cluster)) { exfat_error("got invalid cluster"); return -1; } loffset = offset % CLUSTER_SIZE(*ef->sb); remainder = MIN(size, node->size - offset); while (remainder > 0) { if (CLUSTER_INVALID(cluster)) { exfat_error("got invalid cluster"); return -1; } lsize = MIN(CLUSTER_SIZE(*ef->sb) - loffset, remainder); exfat_pread(ef->dev, bufp, lsize, exfat_c2o(ef, cluster) + loffset); bufp += lsize; loffset = 0; remainder -= lsize; cluster = exfat_next_cluster(ef, node, cluster); } if (!ef->ro && !ef->noatime) exfat_update_atime(node); return size - remainder; } ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node, const void* buffer, size_t size, off_t offset) { cluster_t cluster; const char* bufp = buffer; off_t lsize, loffset, remainder; if (offset + size > node->size) { int rc = exfat_truncate(ef, node, offset + size); if (rc != 0) return rc; } if (size == 0) return 0; cluster = exfat_advance_cluster(ef, node, offset / CLUSTER_SIZE(*ef->sb)); if (CLUSTER_INVALID(cluster)) { exfat_error("got invalid cluster"); return -1; } loffset = offset % CLUSTER_SIZE(*ef->sb); remainder = size; while (remainder > 0) { if (CLUSTER_INVALID(cluster)) { exfat_error("got invalid cluster"); return -1; } lsize = MIN(CLUSTER_SIZE(*ef->sb) - loffset, remainder); exfat_pwrite(ef->dev, bufp, lsize, exfat_c2o(ef, cluster) + loffset); bufp += lsize; loffset = 0; remainder -= lsize; cluster = exfat_next_cluster(ef, node, cluster); } exfat_update_mtime(node); return size - remainder; } partclone-0.2.51/src/exfat/libexfat.a000066400000000000000000005753041200565264100174430ustar00rootroot00000000000000! / 1341843650 0 0 0 1192 ` =ìììììììsHsHsHsHsHsHsHsHsHsHºÌºÌºÌºÌºÌÙ<Ù<Ù<Ù<Ù<l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤l¤d˜d˜d˜Œ„Œ„Œ„´T´T´T´T´T´T´T´T´T´Texfat_c2oexfat_next_clusterexfat_advance_clusterexfat_flush_cmapexfat_truncateexfat_count_free_clustersexfat_find_used_sectorsexfat_openexfat_closeexfat_fsyncexfat_seekexfat_readexfat_writeexfat_preadexfat_pwriteexfat_generic_preadexfat_generic_pwriteexfat_bugexfat_errorexfat_errorsexfat_warnexfat_debugexfat_opendirexfat_closedirexfat_readdirexfat_lookupexfat_splitexfat_mountexfat_unmountexfat_get_nodeexfat_cache_directorynext_entryexfat_flush_nodeexfat_put_nodeexfat_reset_cacheexfat_utimesexfat_update_atimeexfat_update_mtimeexfat_mknodexfat_mkdirexfat_rmdirexfat_unlinkexfat_renameexfat_get_labelexfat_set_labelexfat_exfat2unixexfat_unix2exfatexfat_tzsetutf16_to_utf8utf8_to_utf16utf16_lengthexfat_statexfat_get_nameexfat_start_checksumexfat_add_checksumexfat_calc_checksumexfat_vbr_start_checksumexfat_vbr_add_checksumexfat_calc_name_hashexfat_humanize_bytesexfat_print_infocluster.o/ 1341843649 1000 1000 100644 28192 ` ELFàV4(UWV‰ÆjSƒåøƒì9ê‰ $r ë8ƒÂ9Õv1‰Ó‰ÑÁëƒáó¶¶ø£Ïrâ¾Óæ ðˆBƒÄ[^_]Ãt&‹$Áíƒàø‰ÇÁï9ý‰D$s).¶€úÿt¶Ú1Éf£ËsSƒÁƒùuóƒÅƒÀ9ýrÚ‹D$9$v.÷¶öÂtZ‹,$ë‰Ç‰ÁÁïƒá÷¶¶Ú£Ës(ƒÀ9Åwâ¸ÿÿÿÿétÿÿÿ»Óã ÚˆƒÄ[Dé^_]ûÓã‰Ù уÀˆéHÿÿÿ‹D$¹ëé‰ö¼'ƒì,‹H ‰\$$Zþ‰t$(‰Æ9ËÀ!ËF‰ÚèÍþÿÿƒøÿtÇF$‹\$$‹t$(ƒÄ,Ãt&‹F1Ò‰Ùè¤þÿÿƒøÿu×Ç$‰D$èüÿÿÿ‹D$‹\$$‹t$(ƒÄ,Ãë ƒìƒú‰t$‰Ö‰|$v.‹ƒî1ÿ1Ò‹AX¶Im¥÷ÓæöÁ t‰÷1öð‹t$ú‹|$ƒÄÉT$Ç$èüÿÿÿƒì<‹‰\$0‰Ë‰|$81ÿ‰t$4¶Jl‹rP¥÷ÓæöÁ t‰÷1ö‹T$@ 1ÛÎ߉t$ ‰T$,T$,‰|$ÇD$‰T$‹‰$èüÿÿÿ‹\$0‹t$4‹|$8ƒÄ<Ãë Sƒì‹\$‹T$Cèÿÿÿ‹K¶Il¥ÂÓàöÁ t‰Â1ÀƒÄ[Ãfƒì<‹D$H‰\$0‹\$@‰t$4‰|$8ƒøv}‹T$DöB.tƒÀ‹\$0‹t$4‹|$8ƒÄ<ô&‹S1ÿ¶Jl‹rP¥÷ÓæöÁ t‰÷1öÁà1ÒÆ×D$,‰t$ ‰|$ÇD$‰D$‹‰$èüÿÿÿ‹D$,‹\$0‹t$4‹|$8ƒÄ<ÉD$Ç$-èüÿÿÿ´&UWVSƒì‹l$4‹t$8‹|$0‹]9ów>‹E9órë)t&ƒÃ9Þv‰D$‰l$‰<$èüÿÿÿ‰Âƒâ÷ƒú÷‰Eu܉uƒÄ[^_]ËE(1ÛÇE‰Eë´´&UWVSƒì,‹l$@…턌‹Z(‰×…Û„o9͇ƒ‰Æ‚èÇB(1À‰G‰Øƒíƒà÷ƒø÷ÇG‰l$„F1í‰D$ëRt&ƒû†‹FKþ9Áƒü‰ÈºƒáÁèFÓâ‰Ñ÷Ñ ;l$ÇF$td‹\$ƒÅ‰Øƒà÷ƒø÷t3‰\$‰|$‰4$èüÿÿÿöG.‰D$u™‹T$‰Ù‰ðÇ$èMýÿÿëƒvÇ$nèüÿÿÿƒÄ,¸ûÿÿÿ[^_]ô&ƒÄ,1À[^_]öƒé)é‰L$‰T$‰$èüÿÿÿ‰Áƒà÷ƒø÷t±‰L$‰|$‰4$‰L$èüÿÿÿ‹L$öG.‰Ãt‹G(éÚþÿÿ‰ðVÇ$ÿÿÿÿèÀüÿÿ‹G(éÁþÿÿ‹F‰D$‰\$Ç$†èüÿÿÿ‰L$Ç$èüÿÿÿÇ$>èüÿÿÿ‰l$‰L$Ç$UèüÿÿÿSƒì(‹\$0‹C‰$‰D$èüÿÿÿ‰D$ ‰T$‹C ƒÀÁè‰D$‹C‰D$‹‰$èüÿÿÿÇC$ƒÄ([ô&UWV¾Sƒì\‹l$t‹D$x‹\$p‹T$|‹M4‰D$8‹C‰T$<‹U0‰L$,¶Hl‰T$(‹T$,Óæ¶Hm‹D$(Óæ‰÷ÁÿƒÀÿƒÒÿðú‰t$‰|$ ‰$‰T$èüÿÿÿ‹T$<‰t$‰|$ ‰D$H‹D$8ðúƒÀÿƒÒÿ‰$‰T$èüÿÿÿ‹u…öu ‹M…É…™‹L$,‹T$(3L$<3T$8 Ñ„9D$H‚‡è‹T$,9T$<‚Üfw‹L$(9L$8†Ê‹C¿‰þ‹T$,¶HlÓæ¶HmÓæNÿ‰ÈÁø L$(‰D$4 T$4‰L$@‹D$@‰t$‰T$D‹T$DƒÀ‰D$0‹D$(ƒÒ‰T$4‰òÁú‰T$ ‹T$,‰$‰T$èüÿÿÿ‰l$‰$‰D$èüÿÿÿ‰Æƒà÷ƒø÷„ˆ‰t$‰$èüÿÿÿ‰T$D‹S‰D$@‰ø¶JlÓà¶JmÓà‰ÂÁú‰D$‹D$(‰T$ ‹T$,‰$‰T$èüÿÿÿD$@T$D‰D$ ‹D$0‰T$‹T$4;T$ýÿÿ;D$8†ýÿÿéûüÿÿS‰ñÇ$ÿÿÿÿ‰Øè#÷ÿÿ뵉þë«Ç$nèüÿÿÿ¸ûÿÿÿéÀýÿÿÇ$nèüÿÿÿ‰D$Ç$¹èüÿÿÿÇ$žèüÿÿÿÇ$,èüÿÿÿvWVS‹D$‹p…öt.‹x1Û1Àv‰Ú‰ÙÁêƒá¶ÓêƒâƒúƒÐƒÃ9óuà[^_Ã1ÀëøUWVSƒì‹\$4‹t$4‹‹v‰\$‰t$ Þ„D‹\$8‹‹S‹t$01Û‹v‹NX‰t$)ȶNmÚ­ÐÓúöÁ t‰ÐHƒÀ‹\$‹S\9ÂvC‹t$0ƒé‰ËƒáÁë‹~¶£Ës!é¶Xÿ‰È‰ÞƒãÁî¶47£ÞrH9ÊwãƒÄ¸[^_]ö‰Èët&pÿ‰Ø‰õƒæÁí¶,/£õƒÞX9Úwß‹t$ t$u‹t$8‹T$0‹Fr‹T$8 t‹t$0‰ÊƒÆ‰ðè/õÿÿ‹L$4‰‰Q‰Ú‰ðèõÿÿ‹\$¶Kl»‰Æ‹D$‰×Óã¶Hm‰ØÓàƒè‰ÂÁú÷û‹\$8‰ÂÁúÆ×1À‰3‰{ƒÄ[^_]Ët$8‹V‹‰Ñ Á…²þÿÿ‹\$0¸¹‹[‰\$éÂþÿÿXþ‰ÙÁé¶4‰Ùƒá£Î‰Á‚ÿÿÿ‰Ët&‹t$ ƒë t$„"ÿÿÿé3ÿÿÿno free space leftinvalid cluster number %ubad cluster 0x%xzero difference passedfile underflow (%u < %u)invalid cluster in filebad cluster 0x%x (0x%x)zero clusters count passednon-zero pointer index (%u)unable to shrink empty file (%u clusters)no references, node changes can be lostà§Ö À¶int Õ,ç¤G’u/v8hà‡,8ˆ,Š›Ÿ%Žo-_•›Ç“x”Þ3#ÝÁ#[Á#%Á#  Á#/Á#¨Á#8Á#TÁ# =Á#$åÁ#(3 Á#,ë"Í#0ê$Ó#4&3#8ý*3#<f,#@0L#DØ1Z#F2Ù#G6é#Hõ?¢#LµH¿#T¼I¿#XÃJ¿#\ÊK¿#`ÑL:#džN3#h/Pï#l +´ Ë ºÍ @»Í# ¼Ó# pÀ3#–Î Çé ­ Çÿ ­'Çž]¢IB…UQzL´< 1E@2LÐ4,×;% P€  PH#Ë Pi Q¢  QS#Þ Q‹ RÄ O R^#h R­u S 1ÿ œ 3=# L 4=# $& g &&# ? '6# Å (F# r )Ä#@ µ *Ä#H ¤ +¢#P 6 ,¢#T “ -¢#X Ù .¢#\ Œ /¢#` · 0¢#d È 6Ú#h N 7€#j ` 8=#l  9=#m :=#n E ;=#o ¥ <=#p Ï =V#q g >€#þ =6 ­ =F ­ =V ­4 =g­Œ6D 5G n 7G# ý 8G# à 9G#  :G# = <3#  =S# ô >Ï# Ç ?Ï# K @ # ó AÏ#( l B3#,  C^#0 h D+#8  D+#< è EM#@g €^­ Q­ ó SÏ#  TS# _ U­#  VS# 2 W3#= ·¤ J˜dev Lž#sb M¤# ¹ Nª#  O:# Ù PG# l Y^# o Z°#( Y \¿#„ å ]3#ˆ ˜ ]3#Œuid ^ #gid _#”ro `3#˜  a3#œ „ b3# ½˜ÿ€ ÇÀ ­Zs2o çefç í³ñ VS v V¢s2c7Ï4ef7ç7 @Sfef@çF@^²B^A“3¤ef“ça”¤b”¤end–ªÏÏc2s$ Öef$ç_$Ï Z¢úv ZSt Z¢Ž™I ef™çe™3ÕšÏÚϜœ 5¢úD{ efD{ D: ×D ³!FÏÊ efFçÒGÊ _GÏÃI¢œJ Ð g"lÏo #õl­à#ílÏ0$endmÏQ%(oª %pªä&cqÏF% rÏ©'&bit~ÏÒ"é§Ïåú $ef§{ )#b§Ïn%_©Ï—(3Õ Ì )Rs(\Õ å )R0)Qs*qc)t+¯àµA ,Êí-ÀúÀŸ*àx)t)tv+úàQ1È , ^-' ‘. . /2 Š0= ‘l. 1Àõ ¡° ,Û¢'8.Ñ*A)t‘l)t42H/ `޽M 3ef/ç‘4_/Ï‘5Àt‰1- ,Û6t‰.Ñ*tú )Ps)R‘7Às+ 9' -“ ‘- ‘-¨ ‘8³ 8¾ 5 ÐF ,¨ l,“ ‹6Ð0³ ‘l/¾ ª. 1ÀÕPQñ ,Û3'h.Ñ*°)t‘l)t4*9x)t-)t‘2}WÏ@©c” 3efWç‘4ÒXG‘4³XS‘&iZSû* )tw)tuR¼· ef¼{ _¼Ï9ç3°oS:ef{ ñ;ÒG™;ÕS9 ;SË <ŠÏ% <Ãχ =ú€<~,' Ê ,  , 6 '¨. 82 8= . =” Ð>À,« U ,¡ ~ *?x)t†)ts>ð|< !Ï· =úû)#,' Õ , ê , ý '(. 82 8= . (¤c;)tn(Ý' c)tv)tw)tu óQ"*û )tv)tw(u Ÿ)tv)tw)ts(“A Î)Pv)R‘\)Qs)t07 v( A ÷)Pv)Rv)t ÿ7 v(Ox)t)tóQ([x/)t>*ox)tU)tóQ)tu?N’p¹ ™3ef’{ ‘(‡È )ts@­XÔ3÷efÔ{ ÒÔGÕÕSÕSŠ×ÏÃØÏ¨ÙSÈ.efÈçHÈÏ ÉÏcËÏqI3ˆefI{ ÒIG J^endJ^AuL^A_MÏBj3À ` ÏCefj{ ‘DÒjG‘Dj^‘c1lSc2mSErcn3Œ =4Ã@l*-O‘¸'h.E/ZÛ =4,m[-O‘H'¨.E/Zó =.À~Ï,c ,W7,Kf,@'à/o¸/{ä=I ‰[ê,n .,b ˜' .W .W @Å=I @d*,n ,b ''X.W .W @>(-' F)ts)tu(GÈ b)ts)tv(ð …)ts)tu)tv( È ¡)ts)tv(Ï c¹)tn*å x)tn=™¨pwÿ,ÊQ,¿Ç,´ÿ,ªd'¨/Õç/àR/ë=úg èq,' ø, , 4'. 82 8= . F÷Û  ý,h,{,Ž6Û  /$¡Gúù û Î,' ×, ê, 6ù û . 82 8= . Fún ˆ  K,' , @, ^6n ˆ . 82 8= . (Õo d)Ps)R0(K o ~)Pu)Rw(· ' ¤)ts)tu)t‘X1(V · Ñ)Ps)Ru)Q‘@‘X")t‘@(õ xé)t¹* x)tž(‚Ó)tu(, A ;)Pu)Rs)Qw)tv(Ž · \)Ps)Ru)Q‘X(÷ A ‹)Pu)Rv)Qs)ts7 u(½ A º)Ps)Rs)Qv)t ÿ7 s* x)t,HüˆS P ”:efˆçü< ŠS'Ei‹SRHÿª3P  }CCefªç‘CaªC‘CbªC‘Eca¬Ï]Ecb¬Ï½=  (²ª,('H.=  h³Ó,(0'€.=f® ˜µ,H,ƒp'È.x.x8—(a ú ,)Pv7À‘*s ú )Pv)Rs Ir¥ÓI†¦ÓJó vxKÿLJ+ tKÿLJR …°KžK6K:K J¿ ƒÓKžK¿K:K M¢ ¿KG% $ > $ > : ; I  I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I& : ;  : ; !I/ : ; I8 < .: ; ' I : ; I: ; I.: ; ' I 4: ; I.: ;' I : ;I4: ;I4: ; I.: ; ' .: ;'  : ;I!.? : ; ' I ".: ; ' I@—B #: ; I$: ; I%4: ; I&4: ; I' U(‰‚1)Š‚ ‘B *‰‚1+.1@—B ,1-1 .1/41041 11RUX Y 2.? : ; ' I@—B 3: ; I 4: ; I 51X Y 6 7Š‚1‘B 8419.: ;' I@—B :: ;I;: ;I<4: ;I=1RUX Y> U?.? : ; ' @—B @‰‚1A4: ;IB.? : ;' I@–B C: ;I D: ;I E4: ;IF1X YG1X Y H.? : ;' I@—B I4: ; I? < J.? : ; ' < KILM.? : ; ' < ttt  t tGtGHtHItIJt JKtKPtPÞtÞßtßätäåt åætæçtçtP;V;LóPŸLäVäçóPŸçVRóRŸQGtGL‘dLÞtÞç‘dçt DUDL óR# øŸLVUV óR# øŸGt3%3$ŸGL‘d3%3$ŸLÞt3%3$ŸÞç‘d3%3$Ÿçt3%3$ŸDRLiR§t3%3$Ÿ§¿PÂÆPçðPüt3%3$ŸV¥UÐæUüU€…QtJt0JPtP€t0€t'P'GVGKóPŸK}V}óPŸRCSKyS3SP\pP“t“Ït ÏÐtÐàt «R«·vŸ·ÐóRŸÐßRßàVàãtãPtÀPQtàùQùSQóQŸIV“W“å rÐ÷,÷%Ÿ`atadtdŒtŒtŽtt€P“R““t“ÈtÀÈÐtÐ(tÀ()t)9tÀÐíPí)‘ÐS)‘ÓírÐ÷,÷%rì”ÿ÷,÷%$p2$÷,÷%"Ÿíï rÐ÷,÷%rì”ÿ÷,÷%$‘2$÷,÷%"Ÿï$s#P÷,÷%s#l”ÿ÷,÷%$‘2$÷,÷%"ŸÓï rÐ÷,÷%Ÿï s#P÷,÷%Ÿ@AtABtBCt CDtDGtG’t0’“t“”t”•t •–t–˜t˜©t0]“S°±t±²t²³t ³´t´·t·§tÀ§­t­®t®¯t ¯°t°¸t¸»tÀ»¾t¾¿t¿Àt ÀÁtÁÈtÈotÀ°éPé®V®±óPŸ±¿V¿Â‘\4ŸÂÜPÜ?V?NPNOóPŸOZPZ[óPŸ[nPnoóPŸ°éRé¯W¯±óRŸ±ÀWÀÂóRŸÂÜRÜ?W?NRNOWOZRZ[óRŸ[nRnoW°éQéÂóQŸÂËQËÍqŸÍ?óQŸ?NQNOóQŸOZQZ[óQŸ[nQnoóQŸ°ì‘ìñUñ‘ U ‘XÂ(‘?o‘àRSRe‘Te•S±Â‘T P SP?Se‘T}‡P‡•‘T±Â‘T(?‘Te0Ÿ}•0Ÿ±Â0Ÿ(?0ŸXS}•S±¾S(?S}’ w,@<$0.ÿŸXS±¾S(?SeV±¿V¿Â‘\4Ÿ(?VßâPâúQ( ÿŸQ w,@<$0.ÿŸpqtqttt·t0·¸t¸¹tÀÁtÁÂtÂÃt ÃÉtÉÌtÌœtðœtžtžŸt Ÿ t ¨t¨™ tð™ š tš › t› œ t œ t   t  Y tðY _ t_ ` t` a t a b tb h th tðV0Ÿ¡Ž 0ŸŽ ž Pž t 0Ÿª à 0Ÿå 0ŸYV“W“<YV“W“—‘H‡ ª ‘HÙ å ‘H—‘¸‡ ª ‘¸Ù å ‘¸—U‡ ª UÙ å U—S‡ ª SÙ å Sz‘@‡ ª ‘@Ù å ‘@/2P2òVòõPõzV‡ ª VÙ å VNb%‘¸ö%1rì”ÿ$rí”ÿ$÷3÷%‘Pö%"Ÿb€)‘¸ö%1s#l”ÿ$s#m”ÿ$÷3÷%‘Pö%"ŸNz‘@ö%‘Hö%-(÷,‘¸Ÿ‡ ª ‘@ö%‘Hö%-(÷,‘¸ŸÙ å ‘@ö%‘Hö%-(÷,‘¸Ÿ P“R“ =1s#l”ÿ$s#m”ÿ$Ÿ¡¬p‘XŸ¬ÄPÄs ‘Pž ¤ P¤ t ‘Pª à ‘På õ ‘Põ P  ‘P¡s ‘Xž t ‘Xª à ‘Xå  ‘X¡ U ‘¸ s ‘ž Ë UË t ‘ª ¿ ‘¿ à Uå  U¡ S s Už Ø SØ : U: > ‘> _ S_ c ‘c n Un t Sª à Så  S×ÚPÚ, W, A VA s W¹ ¼ P¼ a Wc t Vª ¿ V¿ à W  VM P PP n VØ å Vå  ‘\) V V¡õ0Ÿõ 1Ÿ1 A ‘@ž Ø 0Ÿc n Q¿ à 1Ÿå  0Ÿg s V ) Vg s W ) Wg n p@<$0.ÿŸ ) p@<$0.ÿŸÛ ) WÛ å QÛ ) UÛ ö Qö ÷ sŸ÷  S ) Që  Së ö Qö  sŸë  0Ÿn t  ÿŸª ¿  ÿŸn t Vª ¿ Vn t u,@<$0.ÿŸª ¼ u,@<$0.ÿŸ  t  t  t  I tI J t J K tK L tL P t L ‘L N PN P ‘ % 0ŸA H PL P 0Ÿ % 0ŸD H SL P 0ŸP Q tQ R tR S t S T tT W tW ø t0ø þ tþ ÿ tÿ t  t  t ³ t0³ ´ t´ µ tµ ¶ t ¶ · t· ¸ t¸  t0® Ò PÒ î Qî ñ Pñ õ Q P ` Qå  P  Q¤ ¹ Q¹ ¾ qŸ¾ Á sŸ * S- w Så  P  S § ‘X“‘\“ P“R“§ ¸ òrå  òr§ ¸ òcå  òc x…ÐÛßãõùü õùü ÕÙÜêÕÙÜê  uy}˜  uy}˜GKR+?˜¤§¬È+û+û+ÃÈñõù,8<ÃÈñõù,8<,8<V,8<Vzˆ ª à å zˆ ª Ã å ‰‘•­Å‰‘•­Å &> &>¨x   V Y ^ n ˆ ª à å  ¨  n   V Y ^ n ˆ ¿ à å  g n    0 g n    0 ƒ † ‰ “ ƒ † ‰ “ “ ® “ ® ® õ ø ý  1 å   ® » ¾ ß â õ ø ý    1 å ñ ö   û libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/include/usr/include/i386-linux-gnu/syscluster.cstddef.htypes.hlibio.hstdio.htypes.htime.hstdint.hbyteorder.hexfatfs.hexfat.híY;!;Bz.B­h­<`º <u< <ut Jq.<éW} ž‘'{tž ¬tJ JÃ/;/U<@8M9J3hŸ`vw»ZóOê~ž>: 0/WY0H0òòDx.¦x.…JƒJý~<…ÖIMIKÉ‹ÖJKŠJö|<mXJtj[ŸAbMX3JM<4ÖWL&xò ft½¤"ó=1>uWu´ºtN„Ê¢f“A,>zfxL…fû~<….…~¬‘e†ðt‘Jït .wt£ä~òœJä~J†žºd<Xã/`¬;>‡÷~<‰‚÷~.œº‡~Ø<ð¾÷~JJK5uÔº×}<©XJó;ÐJ°ñÿ q-P8àqW°¿   coy†`.©£¯@iÅpIÖàêÀMù  @&P Îcluster.cfind_bit_and_setallocate_clusterc2s.isra.4set_next_cluster.isra.5.part.6shrink_fileexfat_errorexfat_bugexfat_pwriteexfat_c2oexfat_next_clusterexfat_preadexfat_advance_clusterexfat_flush_cmap__udivdi3__umoddi3exfat_truncateexfat_update_mtimeexfat_count_free_clustersexfat_find_used_sectorsdm×Ü=05{q› Ù÷6;F KRWfkƒ©(R)C}Áì:~!³ Æ Ë Ü á ì ñ ø ý    !(/;HOV]dkp{†‘ž£°µÊÏÜëú '6ETcrŸ®½ÌÛêù&5DSbq€—£±¿ !,>IT_r”£¶ÅÐãñ )7ESao}‹™§µÃÑßíû huƒ‘Ÿ­»É×åó+9guƒ‘Ÿ´Ûé÷!0?z‰™Üó)5P[gË×û  ( 3 > J c o ƒ ž © ´ ¿ Ö á å é ó ý     * / 9 F K U Z i p {  ƒ – › ¥ ª ´ ¹ Í æ ô ÿ    & 4 F J N \ w  ‘   ¥ ± Ê Õ Ù Ý ô     " . R V Z Š Ž  ¦ « ¯ À Î Ò á æ ò   ) 4 8 < S a w | • ¬ ¸ Ä È Ì à å ð õ  %09=MV_dƒ‡— ¥³ÁÊÕÞâòû $6<d} Ïø  *0>U\`d{šµÀËÖáìø/LXp|Š–šž¶Åôý$/3GU`dt}†”¦¯³ÃÌÑàïó  +Gc†¢´ºÈÔØèñú#,0@IRWvzŠ“œ¡¥®·»ÆÏØÝá(-1Le¥Òäêø<]Œ»É ÑÝáåùþ *.2n}†ŠšŸ¯³ÃÈØÜìõú-JWez²ÕS c { ‹  ! x Äè8xÐôd”io.o/ 1341843649 1000 1000 100644 18248 ` ELF34(VSƒìtÇ$‹´$€èüÿÿÿ…À‰Ã„öƒ¼$„‰4$Àƒà‰D$èüÿÿÿ…À‰ˆ›T$‰T$‰D$Ç$èüÿÿÿ…ÀuW‹D$ ‰Ââ°ú t %ð=€uƒÄt‰Ø[^ô&‹‰$èüÿÿÿ‰$1Ûèüÿÿÿ‰t$Ç$TèüÿÿÿëËf‹‰$èüÿÿÿ‰$1Ûèüÿÿÿ‰t$Ç$ èüÿÿÿë£f‰$èüÿÿÿ‹”$„¸…Òt¸‰D$1Û‰t$Ç$0èüÿÿÿéiÿÿÿÇ$èüÿÿÿéXÿÿÿ´&Sƒì‹\$ ‹‰$èüÿÿÿ‰$…ÀuèüÿÿÿƒÄ1À[ÃvèüÿÿÿÇ$ èüÿÿÿƒÄ¸[ö¼'ƒì‹D$ ‹‰$èüÿÿÿ1Ò…ÀtÇ$7èüÿÿÿº‰ÐƒÄÃf‹D$‹‰D$éüÿÿÿ‹D$‹‰D$éüÿÿÿ‹D$‹‰D$éüÿÿÿƒì,‹D$4‰\$ ‹\$8‰t$$‹t$<‰|$(‹|$@‰D$‹D$0‰\$‰t$ ‰|$‹‰$èüÿÿÿ9Øu‹\$ ‹t$$‹|$(ƒÄ,Ét$‰|$ ‰\$Ç$„èüÿÿÿ´&ƒì,‹D$4‰\$ ‹\$8‰t$$‹t$<‰|$(‹|$@‰D$‹D$0‰\$‰t$ ‰|$‹‰$èüÿÿÿ9Øu‹\$ ‹t$$‹|$(ƒÄ,Ét$‰|$ ‰\$Ç$°èüÿÿÿ´&UWVSƒìL‹L$d‹T$t‹D$p‹l$`;Q4‰T$,‰D$(v 1ÀƒÄL[^_]Ãfƒò‹t$l1À…ötæ‹U¾‰ð¶JlÓà¶JmÓà‰ÂÁú‰D$‹D$(‰T$ ‹T$,‰$‰T$èüÿÿÿ‹T$d‰,$‰T$‰D$èüÿÿÿ‰Çƒà÷ƒø÷„·‹E¶Xl¶@m‰ÙˆD$?‰ðÓà¶L$?Óà‰ÂÁú‰D$‹D$(‰T$ ‹T$,‰$‰T$èüÿÿÿ‹L$d‰T$4‹Q0‹I4‰D$0‹D$(‰T$ ‹T$,)D$ ‰L$$T$$ƒ|$$†-‹L$lÇD$$‰L$ ƒ|$$ŒÞŽL‹D$h‰Ù‰û‰D$(¶D$?ë*‰Øƒà÷ƒø÷„‹EÇD$0ÇD$4¶Hl¶@m¾Óæ‰ÁÓæ‰÷Áÿ+t$0|$4;|$$|;t$ v‹t$ ‹|$$‰\$‰,$èüÿÿÿ‰t$D$0T$4‰D$ ‹D$(‰T$‰D$‹E‰$èüÿÿÿ‹T$dt$()t$ |$$‰\$‰T$‰,$èüÿÿÿƒ|$$‰ÃIÿÿÿ| ƒ|$ ‡<ÿÿÿ‹˜…Ûu ‹ …ÉtQ‹D$l+D$ ƒÄL[^_]Ã;A0‚þÿÿ1Àéîýÿÿ‹T$l9T$ †ÕþÿÿéÀþÿÿt&Ç$DèüÿÿÿƒÄL¸ÿÿÿÿ[^_]ËL$d‰ $èüÿÿÿ롃|$ v…é§þÿÿt&¼'UWVSƒìL‹T$t‹D$p‹L$dÇD$$‹l$`‰T$,‹T$l‰D$(‰T$ ‹T$$‹D$ D$(T$,;Q4v4‰D$‹D$d‰T$ ‰,$‰D$èüÿÿÿ…Àu ‹|$l1À…ÿu&ƒÄL[^_]öræ;A0wÅ‹|$l1À…ÿtá´&‹U¾‰ð¶JlÓà¶JmÓà‰ÂÁú‰D$‹D$(‰T$ ‹T$,‰$‰T$èüÿÿÿ‹T$d‰,$‰T$‰D$èüÿÿÿ‰D$<ƒà÷ƒø÷„5‹E¶xl¶Xm‰ð‰ùÓà‰ÙÓà‰ÂÁú‰D$‹D$(‰T$ ‹T$,‰$‰T$èüÿÿÿ‰ù‰T$4‹T$h‰D$0‰Ø‹\$<‰T$(ë.t&‰Øƒà÷ƒø÷„Ò‹EÇD$0ÇD$4¶Hl¶@m¾Óæ‰ÁÓæ‰÷Áÿ+t$0|$4;|$$|;t$ v‹t$ ‹|$$‰\$‰,$èüÿÿÿ‰t$D$0T$4‰D$ ‹D$(‰T$‰D$‹E‰$èüÿÿÿ‹T$dt$()t$ |$$‰\$‰T$‰,$èüÿÿÿƒ|$$‰ÃIÿÿÿ| ƒ|$ ‡<ÿÿÿ‹L$d‰ $èüÿÿÿ‹D$l+D$ ƒÄL[^_]ÃÇ$DèüÿÿÿƒÄL¸ÿÿÿÿ[^_]Ãonlywritefailed to fstat `%s'failed to close devicefsync failedgot invalid clusterfailed to allocate memory for device structurefailed to open `%s' in read-%s mode`%s' is neither a device, nor a regular filefailed to read %zu bytes from file at %llufailed to write %zu bytes to file at %lluHž­‰¾?Õ7¹ƒ íéint§8h9%Ö†za‡7–ˆ7j‰L—ŠzS‹7Œ7óÝóŽoÓ»•ÝK¤ÝOªoW´a*ù”òòa#B$#Æ$#b$# ˜$#—$#«$#°$#G$# È$#$ $#(w $#,ÿ"0#0c$6#4(&a#8~*a#< ,Ò#@Œ0E#Du1S#F 2<#G§6L#H?ä#LRH#TYI#X`J#\gK#`nL,#dNa#h§PR#l &´ 1 º0 „»0# ‘¼6# ƒÀa#ù1 *L ïò *b ï'h*´B›ÀQYäenLöª 0`' û)…# R*E# Ù.¦# Š0¼# §1Ç# ì2# p3›# o4…# Y5E#( Ñ9ä#, ç;#4 Õ@#8 \Pö#@ qQL#D úRö#H »SL#L iTö#P §UL#T ˆ[±#Xs 1>ž 2EÓ 47" ;% P ½ PÍ# Pî Q' { QØ# Q RI º Rã#Ä R2â Ø 1„ 9 3Â# ¡ 4Â# $« Ë &«# W '»# a (Ë# ë )I#@  *I#H  +'#P Ü ,'#T – -'#X u .'#\ ) /'#` S 0'#d Ë 6_#h Î 7#j S 8Â#l ( 9Â#m :Â#n Å ;Â#o : <Â#p k =Û#q  >#þ » ï ÂË ï ÂÛ ï4 ÂìïŒ<D 5Ì â 7Ì# " 8Ì# Æ 9Ì# = :Ì# ª T# C ?T# Þ @ƒ# ™ AT#( k Ba#,  Cã#0 Ü D™#8 † D™#<  EÒ#@ì ãï Q2 ™ ST#  TØ# r U2# B VØ#  Wa# 3¤ J dev L7 #sb M= # ± NC # F O,# 5 PÌ# Ð Yã# Ë ZI #( ÿ \#„ ù ]a#ˆ þ ]a#Œuid ^x#gid _m#”ro `a#˜ 1 aa#œ ! ba#  9'7 fd)a# „ *Y ïZ¸Õa… ¥ÕaYÕ… «Ü07 ) j0b‘ro0a‘dev27 j\3«‘Y E]G x ×l ]t3t‘(4 t4;A] tvt ÿ0‘0)(2 šc ¤|´‘Ž tTtv Âc Ì|Ü‘¿ t tvè|Ô ts‘ó t0tv$‘tma0s'p devm7 ‘ BcN|R ts ]|i‘t ø}a€®º dev}7 ‘ ‘¦£‘t7!1‹ƒ°¿t dev‹7 ‘ß‹ƒ‘L‹a‘ "¿¿‘‘ö%‘ ‘ !x•ŽÀÏt‚ dev•7 ‘•‘•,‘"Ïæ‘‘‘‘!_¡ŽÐßtå dev¡7 ‘¡¤‘¡,‘"ß ‘‘‘‘#ü­àI»p dev­7 ‘­‘­,‘ß®ƒ‘ ,T t‘tsIXt„ts#°¹P¹óû dev¹7 ‘¹¤‘¹,‘ߺƒ‘ mß t‘ts¹Xt°ts$æÅŽÀE+NefÅN‘Å̑ƑÆ,‘ ßƃ‘%ÃÈTW%:É$¬%óʃð%½ʃ%rʃlK™Ætut‘c»âtutsŠå ÿt‘HtvªØ#tut‘ts‘;tD5t‘T8$6íŽP‰Œáefíá‘í̑î,‘ ß%ÃðT«%:ñbö%óòƒ%½òƒ>%ròƒz&”°<rcöaެtut‘+™Ytut‘ó»ututsp ’t‘Htv:ضtut‘ts`;Ìt‘|‘tD8' ¥6'ˆ ¦6(Óœ+a()a)a)… *ª×A),+”z*ac)b)a,*<^a|)a-’è‘).„ v¦)b,*~Ða¿)a(mNÕäæ)a)ä)a*˜eŽ )a)),*µkŽ,)a)¤),(µQŽX)a)),)ä.M tm)b,(w„Ž™)a)¤),)ä/Ý ˜T»)N)Ì)Ø/` •ƒØ)N)T/' –Tú)N)ú)Tì.| ¾)Ì/ ›a;)á)Ì)ã0? ¿)Ì% $ > : ; I$ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I& : ;  : ; !I/ : ; I8 .? : ;' I : ;I.? : ; ' I@—B : ; I : ; I 4: ; I4: ; I 1X Y 1‰‚1Š‚ ‘B ‰‚1 ‰‚1!.? : ; ' I@ —B "‰‚•B 1#.? : ; ' @—B $.? : ; ' I@–B %4: ; I& '4: ; I? < (.? : ;‡@' I< )I*.? : ;' I< +.? : ; ‡@' I< ,-.? : ;' < ..? : ; ' < /.? : ; ' I< 0.? : ; ' < ttt „t€„‡t ‡ˆtˆt)t€/P/S‰ŸSŸ£t¶ÇSÇËtÞS#P#)SEI‘ŸI\R\‘Ÿ‰Þ‘ŸE\P01t14t4Qt QTtTXtXlt lrtrst€ƒtƒ­t ­®tàãtã0t001t1It0PStS t0 ¡t¡¹t0ÀÁtÁÂtÂÃt ÃÄtÄÇtÇétàéêtêëtëìt ìítíðtðãtàãätäåtåæt æçtçètètà%t%&t&'t '(t()t)EtàMPPPÿWÿP±S±ÄPø W7EWÇÿ‘ÿ)‘H’Ä‘Hè ‘7E‘ÿ)V“W“WÄV“W“žÿ‘Pÿ) ž’Ä žø ‘P7E‘PÛè‘@)E‘@PQtQRtRSt STtTWtW½tཾt¾¿t¿Àt ÀÁtÁÈtÈktàkltlmtmnt notoptptà…t…†t†‡t ‡ˆtˆ‰t/2P2‹‘\‹’P’ASA_P_lSW‹‘‹p‘H‹¹V“W“çmV“W“w‹‘P‹¹ ž"p žwp‘@¬°P‰…Fû libexfat/usr/include/i386-linux-gnu/sys/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/includeio.cstat.hstddef.htypes.hlibio.htypes.htime.hstat.hstdint.hbyteorder.hexfatfs.hexfat.hstdio.hstdlib.hfcntl.hunistd.h0_yt{Y-/lƒ-/m‚ð|òQƒtgäŸ>,Yu<Ÿ>,Yw<ƒJL,xJ3tJO :PZ;/zXY¿8\ç@Üz.M»[…÷÷ø@FJY`ešŸ!@E"‰$°µ"3%G(’&_)† ¦*1+¨-%'(m&ï)#6*\.sx»ËÛ    ! ( - : A H O V ] k p { † ‘ œ § ² ½ È Ó à å ò ÷    - 2 ? N ] l { Š ™ ¨ · Æ Õ ä ó    / > M \ k z ‰ ˜ § ¶ Å Ô ã ó ú   " n y „  š ¬ ¸ Æ Ô â ð þ   ( 6 D R ` n | Š ˜ ¦ ´ à Π٠ä ÷   ( ; J U h v … ’   ® ¼ Ê Ø æ ô    , : H V d r € Ž œ í ú   $ 2 @ N \ j x † ” ¢ ° ¾ ì ú   $ 9 ` n | Š ˜ ¦ µ Ä ÿ     [  m  y   ˜ œ    ª  Ï  Ô  ç ë ú     ! 5 ^ g p ‚  ˜ ¡ ³ À Õ ç ô        5 > S \ j r  }  …  ¦ ´ ¼  Ç Ë æ  ô   !  , 0 K  Y  g „  “ ®  ¼  Ê ç  î ò ö      *  8 U c r  y }   ™  §  µ  à à î ý    ' 5 C Q _ i n x } ‡ Œ – › ¥ ªÇã$6<[ fjn … “ ¡ ¯ ½ Ç Ì Ö Û å ê ô ù    #=Zv“·ÍÛè õ   * C I e ~ “ ¨ Á È è  . 5 Z o v › ½ Ú   = S P|”¨¼Ðø Œlog.o/ 1341843649 1000 1000 100644 7732 ` ELF4(VSƒì¡‹\$ t$$‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿ¡‰t$‰\$‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿ‰t$‰\$Ç$èüÿÿÿèüÿÿÿ´&¼'VSƒì¡‹\$ t$$ƒ‰$èüÿÿÿ¡ÇD$ÇD$Ç$ ‰D$ èüÿÿÿ¡‰t$‰\$‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿ‰t$‰\$Ç$èüÿÿÿƒÄ[^öVSƒì¡‹\$ t$$‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿ¡‰t$‰\$‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿ‰t$‰\$Ç$èüÿÿÿƒÄ[^ö¼'ƒì¡‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿD$$‰D$‹D$ ‰D$¡‰$èüÿÿÿ¡ÇD$ÇD$Ç$‰D$ èüÿÿÿƒÄÃBUG: . ERROR: WARN: DEBUG: |g«[1Õ0Z#ç7'intôC8aV…å=Žo8¦¹â1¸”y`Z#  #‡ # # ˆ #R #% #t #­ # È #$^ #(  #,~"Ì#0O$Ò#4G&Z#8*Z#<,z#@î0>#D¬1L#Fr2Ø#Gß6è#HA?Œ#LÄHž#TËIž#XÒJž#\ÙKž#`àL%#d‰NZ#h—Pî#l(„ ¦ ´ g ºÌ ¾»Ì# ç¼Ò# úÀZ#•¸ ¦è—Ž ¦þ—'¦vPy3’õØþ‘ap Vaq Vr?‰tt1t5T»¥tstvyÉtt1t2Þët2tstv’ü”4 :8ÆØ4þ‘ap6 ”aq6 ”Árægt t1t7û»ƒtstv §tt1t24Þt3tstv J@Ó´—ØJþ‘apL aqL Zr8tt1t6”»Ttstv¹xtt1t2ÍÞt4tstvÖ^à[09Ø^þ‘ap` \ðrûtt1t72»t‘t‘Wtt1t2n¥Òí¦ÒѧһZÿïZŠŠ­ú0»00žIpZÞŠþy  ÈüZþy!1 % : ; I$ > $ >   I : ; : ;I8  I : ;  : ;  : ; I8 I!I/ &I&.? : ; ' @—B : ; I 4: ; I ‰‚1‰‚1Š‚ ‘B 4: ; I‰‚14: ; I? < 4: ; I?  .? : ; ' I< I.? : ; ‡@' I< .? : ;' I<  .? : ; ' < !.? : ;' < ttt ’t  ¡t¡¢t¢¥t ¥7t 78t 89t9:t²9V9:‘Ÿ@AtABtBEt EÐt ÐÑt ÑÒtÒÓtRÒVÒÓ‘ŸàãtãZt Z[t!P!1‘h1[‘Ÿ[Súû libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/include/usr/include/i386-linux-gnu/syslog.cstddef.htypes.hstdio.hlibio.hstdarg.hsyslog.hstdlib.h^zXMMƒ%L%?5_yXNIxƒ%L%>Á^zXMMƒ%L%>4?É%K„%__quad_tvsyslog_IO_FILE_IO_save_endshort intsize_tsizetype_offsetvfprintf_IO_write_ptr_flagslibexfat/log.cva_list_markers_IO_read_endexfat_errorexfat_warn/home/thomas/source/exfat-utils-0.9.7stderrformat_locklong int_cur_column_posfflush_old_offset__builtin_fwriteunsigned charabortsigned charlong long unsigned intunsigned int_IO_marker_shortbufGNU C 4.7.1_IO_write_base_unused2_IO_read_ptr_IO_buf_endchar_next__pad1__pad2__pad3__pad4__pad5short unsigned intfwritelong unsigned int__builtin_va_list_IO_write_endexfat_bug__off64_t_fileno_chain__off_t_IO_backup_basestdin_IO_buf_base_flags2_mode_IO_read_base__gnuc_va_list_vtable_offsetexfat_errors_IO_save_baseexfat_debugFILE_sbufstdoutlong long int_IO_lock_tGCC: (Debian 4.7.1-2) 4.7.1zR| ˆ’A†A ƒC (< šA†A ƒC ’ AÃAÆ(h@“A†A ƒC ‹ AÃAÆ”à{C w.symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.1.rel.debug_info.debug_abbrev.debug_loc.rel.debug_aranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@[ ¬h%œ+œ02œ C¼? èOÄ Á]… ˆl h ü - W{  ‹0„ –0‘Ÿ®³°¨¯  X½ˆ° 8tñÿ   ’&-6>D šPòÿ]@“hà{log.cexfat_bugstdoutfflushstderrfwritevfprintfvsyslogabortexfat_errorexfat_errorsexfat_warnexfat_debug2;@PUlu‰Ž¦´½ÂÙâç÷ü0FV[r{€•¬µÉäìñ&.3JS    ! & 3 : A H O V d k p { ˆ  š © ® ¹ Æ Õ ä ó    / > M \ k z ‰ ˜ § ¶ Å Ô ã ò    . = L [ j z †  – ¢ ° ¾   $(,6 ]fxЦ¸Êì÷ þ (6;DVh„–¨È ÏÓ×á ù '9Ugy™  ¤¨² ÊÏØêü': G T a nt ’ ˜ ½ à þ  @l˜lookup.o/ 1341843649 1000 1000 100644 16524 ` ELF$04(S‰Ãƒì€8/uHf‰ËƒÁ€yÿ/tõ‰ÇD$/‰$èüÿÿÿ‰Â)Ø…ÒtƒÄ[É$èüÿÿÿƒÄ[Éö¼'ƒì,‰\$ ‹\$4‰t$$‹t$8‰|$(‹|$0‰$èüÿÿÿ‰ÇF‰\$‰<$èüÿÿÿ…Àt‰\$‰<$‰D$èüÿÿÿ‹D$‹\$ ‹t$$‹|$(ƒÄ,ÃSƒì‹\$$‹‰D$‹D$ ‰$èüÿÿÿÇÇCƒÄ[Ãt&‹T$‹B…Àt‹@‰B…Àt‰D$éüÿÿÿf‹‹@‰Bëç¶1Àö¼'UWVS‰Óì<‰D$‹„$TÇÇD$‰L$‰D$ ‹„$P‰D$D$.‰$èüÿÿÿ…À‰D$t‹D$Ä<[^_]Ãt&‹D$T$$‰T$‰\$‰$èüÿÿÿ…À‰D$uÌ‹D$T$$‰T$‰$èüÿÿÿ‹L$…À‰D$‰„Ï‹\$·D$.ƒÃ@f…À„å‹L$·Q@f…Ò„í‹L$‹i‹y L$.ët&ƒÁ·S·sf…Àt>f…Òty‰ó9øs9ús ·DE·TU)Ð…Àt΋D$‰D$‹D$‰$èüÿÿÿéUÿÿÿt&1É9ùs9ús ·DM·TU)Ð…ÀuÈD$$‰D$‹D$‰$èüÿÿÿ‹D$Ä<[^_]Ãv·Èë½D$$‰D$‹D$‰$èüÿÿÿÇD$þÿÿÿ‹D$Ä<[^_]ËT$‹L$‹j‹z ·Q@1Ééyÿÿÿ‹T$·È‹j‹z 1ÒéeÿÿÿvUWVSƒì<‹|$P‹l$T‹\$X‹G‰$èüÿÿÿ‰\$,‰Æ‰EëD´&ƒû‹D$,u€8.t)‰$‰é‰ò‰\$‰øèàýÿÿ‰t$‰<$…Àu-èüÿÿÿ‹u‹D$,É\$,‰ØT$,è˜üÿÿ…À‰Ãu²ƒÄ<1À[^_]ÉD$èüÿÿÿ‹D$ƒÄ<[^_]ÃvUºWVSƒì<‹|$\‹t$T‹l$X‹\$`÷Ç…÷Ç…"‰Ñ1ÀÁéöÂó«tfǃǃâtÆ‹T$P‹B‰$èüÿÿÿ‰\$(‰E‰‰Ø‰ë‹l$Pë>t&‹D$(‰Ù‰|$‰$‹‰èèýÿÿ…À…Š‹‰,$‰D$èüÿÿÿ‹‰‹D$(ø‰D$(T$(èµûÿÿ…À‰Ç„¡ƒÿ‹D$(u€8.tÙøT$,‰D$,èŽûÿÿ…Àu’‰Ý‹\$(‰Ø ;´&¶€ú:t €ú"tt&âƒê€úw4f‹»þÿÿÿ‹T$P‰D$‰$èüÿÿÿƒÄ<‰Ø[^_]ô&€ú\tÓ€ú|t΃À9ÈuŸ‹D$\‰\$‰|$ ÇD$‰$èüÿÿÿ…À‰Ã…£‹D$(‰é‰|$‰$‹D$P‹èùûÿÿƒøþt›…Àt—‹‰D$‰T$‹T$P‰$èüÿÿÿ‹D$‰Ãévÿÿÿ´&€ú?wÿÿÿ€ú>Fÿÿÿ€ú<„=ÿÿÿƒÀ9È… ÿÿÿfédÿÿÿv€ú*„ÿÿÿ€ú/„ÿÿÿƒÀ9È…ãþÿÿé?ÿÿÿ¶‰Ã‹‰D$‹D$P‰$èüÿÿÿƒÄ<‰Ø[^_]ÃÆ‹|$\²ƒÇ÷Ç„ÞýÿÿfǃêƒÇéÎýÿÿÇ$èüÿÿÿimpossible„fç‘îÕ0²n ÝíintÙ08aJ‡0£ˆ0Ù›jŽo·¨•›ÇK”ÚZ#ŽÁ#íÁ#Á# ÊÁ#‚Á#¤Á#}Á#CÁ# ùÁ#$¼Á#( Á#,ó"Í#0D$Ó#4æ&Z#8K*Z#<ü,#@^0>#DŽ1L#F 2Ù#G‹6é#HÌ?¢#L\H¿#TcI¿#XjJ¿#\qK¿#`xL%#dVNZ#htPï#l &´ ƒ ºÍ #»Í# |¼Ó# ZÀZ#–Î Çé ­ Çÿ ­'Ç]¢´B…ÉQz©L´› 17« 2>Ì 404 ;h Py  PA#( Pb Q› £ QL#µ Q„ R½ à RW#± R¦Ï L 1ø V 36# ) 46# $ A &# = '/# L (?# p )½#@ m *½#H \ +›#P Ì ,›#T -›#X ` .›#\ F /›#` > 0›#d Ä 6Ó#h “ 7y#j ^ 86#l z 96#m :6#n Š ;6#o , <6#p V =O#q ! >y#þ 6/ ­ 6? ­ 6O ­4 6`­Œ8D 5@  7@# Ô 8@# ¿ 9@# # :@#  È# . ?È#  @ # } AÈ#( j BZ#, 9 CW#0  D+#8 S D+#< i EF#@` yW­ Q¦ } SÈ# 9 TL# F U¦# ( VL#  WZ#6 ¤ J‘dev L—#sb M# r N£# õ O%# Õ P@# F YW# ¸ Z©#( ï \¿#„ á ]Z#ˆ P ]Z#Œuid ^ #gid _#”ro `Z#˜  aZ#œ > bZ# $‘øy ǹ ­Z O fâ  h@# < i@#À UAýv Uy4<Z+ef<+aÿ>Z?1 %>ÿ@ ³@>@@y µZ6>+>@A¦ ´O>+>@@L ¯Zv>£>ÿ>%>%B3 t>ÿC% : ; I$ > $ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I : ;  : ; !I/ : ; I8 < .: ; ' I : ; I.? : ;' I : ;I: ;I4: ;I.: ; ' I@—B : ; I4: ; I 4: ; I 4: ; I 1X Y !1 "1# $41%‰‚1&Š‚ ‘B '‰‚1(.? : ; ' I@—B ): ; I *.? : ; ' @—B +.? : ; ' I@ —B ,: ; I-‰‚•B 1. /4: ; I0: ; I 14: ; I 24: ; I 31RUX Y 4 U5416174: ; I8‰‚19: ; I:1X Y ; U<4: ; I? < =.? : ; ‡@' I< >I?.? : ;' I< @.? : ; ' I< A.? : ; ' < B.? : ; ' < Ctt8t 89t9:t:Et EFtFGt,P,GóPŸ,R,GóRŸ/1P1AR0ŸPStS¯t0¯°tˆ›P°±t±´t´Út ÚÛtÛÜtàþ‘þR !t!"t"#t #$t$,t,vtÐvwtwxtxyt yztz€t€ˆtЈ‰t‰ŠtŠ‹t ‹ŒtŒt»tл¼t¼½t½¾t ¾¿t¿ÀtÀítÐ 7P7í‘Ä{ cRcwSw{óRŸ{ S íóRŸ cQcí‘È{jpPp{‘Ì{{„P„ž‘Ì{ž P í‘Ì{Ò S V2SKRV•VÀíSÒú‘Þ{Ÿú2QKRQ“QÀí‘Þ{ŸÒ•‘Ä{Àí‘Ä{,R'PRdRR_Pðñtñòtòót óôtô÷t÷qtÐqtttutuvt vwtwxtxˆtЈ‰t‰ŠtŠ‹t ‹ŒtŒtPuVxŠV'P'YSlsPstSx‰S@OPx€P‘t‘—t—˜t ˜™t™œtœÊtÐÊÍtÍÎtÎÏt ÏÐtÐØtØÇtÐÇÊtÊËtËÌt ÌÍtÍÎtÎtÐõΑXö‘XBWO\P\ÏWÑÌWöPW(P P'S'EPª´P´ÊSÊÎP<WcÏWÑÌWcePeq‘Xe‘\mqPqΑ\ö‘\|ÏWѪW|·S·Æ‘XÑ SQªS|0ŸÒ2PfÒí 2ˆ°ØéX²ˆ°ØéX²s:û libexfat/usr/include/i386-linux-gnu/bits/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/usr/include/i386-linux-gnu/syslookup.cstring2.hstddef.htypes.hlibio.hstdio.htypes.htime.hstdint.hbyteorder.hexfatfs.hexfat.hstring.hî¬fÓxX­X×x¬/$+NU…¤ÖfMƒ/u»K>õJK!gu“KwhK§úòºQrhy‚QŸ-K.r<u-K0&cº$hžŸz<¤r.“ÂJ^Èx.…"ºLCd=ƒZò6ÈtÁ­IY’Z#rOYutf;/yXÏ!¬%SkE¿6åIÉfY‡×^‚f0ZX0HL&Xhqfož#(/WòAÇ'J­-/lu’P(Ç!I9J'Yž&( fat_count_shortbufexfat_super_block_IO_lock_tstrlenexfat_node_IO_buf_endexfat_iteratorsector_bitsflagssector_startfptr_indexbuffercluster_sector_start_IO_write_endunsigned intnextversionuint32_troot_flagsdmask__strspn_c2_markersfptr_clusterro_fallbackexfat_opendirprevchunk_sizeexfat_bugoem_namechunkutf8_to_utf16_posstdoutGNU C 4.7.1upcaseexfat_cache_directorylong long unsigned intexfat_put_nodele32_t_IO_backup_base_offsetchildlookup_name_filenosize_tupcase_chars__u16_IO_read_base_IO_save_end_nextmajorpathcompare_charjumpcmapcharfmask_modefat_sector_startsector_countspc_bits_IO_marker_IO_read_ptruint8_t__u32time_t__a0__a1__a2is_allowed_IO_write_baselong long intlibexfat/lookup.c_IO_save_baseentry_offsetis_last_compboot_signature__quad_tsizenoatimerootdir_clusterminor__pad1__pad2__pad3__pad4__pad5exfat_get_node_vtable_offsetdirty__gid_tuint16_tgid_t__result__u64uid_t__accept1__accept2__accept3_IO_read_endstrchrmtimeparentshort intlong intlengthle16_tnodeuint64_tcompare_name__uid_tget_compexfat_readdirnameexfat_closedirstart_cluster_lock/home/thomas/source/exfat-utils-0.9.7sizetypele16_to_cpufat_sector_countlong unsigned intzero_cluster_old_offsetstdin_IO_FILE__acceptexfat_splitallocated_percentvolume_serial__unused1__unused2cluster_countunsigned char_sbuf_IO_write_ptrreferencesexfat_lookup__time_tle64_tlabel__builtin_strchrcluster_t__off_t__strspn_c1signed char__strspn_c3off_tshort unsigned intexfatexfat_deventry_clustercurrent_chain_flags2atimecomp_cur_column__off64_t_unused2_IO_buf_basedrive_novolume_stateGCC: (Debian 4.7.1-2) 4.7.1zR| ˆ(GAƒE r AÃA KAà HP`C0DƒH†H‡HÇÆÃl°,AƒC fAÃŒà3l  ÍA…A ‡A†AƒHÐJ AÃAÆ AÇAÅF  AÃAÆ AÇAÅD k AÃAÆ AÇAÅA PðA…A ‡A†AƒCPz CÃAÆ AÇAÅA PAÃAÆ AÇAÅTdrA…F ‡A†AƒCP. CÃAÆ AÇAÅH ï CÃAÆ AÇAÅA .symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.1.rel.debug_info.debug_abbrev.debug_loc.rel.debug_aranges.debug_ranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@ \6À%D+D02D COˆ? 7 O×]t`lÔ# h <@ {ô#xl$w‰ L@ ™0ã& ¤0ƒ-­ -Á -¸½ T@8X/˼3à œ5½ñÿ G Í    &-P`;J`o°,~à3Œšð§r³lookup.cget_complookup_namestrchrstrlenexfat_opendirexfat_get_nodeexfat_cache_directoryexfat_put_nodeexfat_closedirexfat_readdirutf8_to_utf16exfat_lookupexfat_splitexfat_bug)>o„˜Æ`”°Bz¥ L}í0ÃBÀùþú ! &3:AHOVdkp{†‘ž£°µÊÏÜëú '6ETcrŸ®½ÌÛêù&5DSbq€—£±¿ !,7BMXkzœ¯¾ÉÜêù"0>LZhv„’ ®¼ÊØæôan|Š˜¦´ÂÐÞìú$2`n|Š˜­Ôâðþ )8s‚’ºÆÔãþ3Q]k‰•¡¯ÍÙåñþ     %  * 4  C  H L U a m | € ‘  – š £  « Ç à ë ï ó  .  3 H d „ ‹  “  · Ë Ö Ú ý    R ] a e  x  } ‡  Œ –  › à Û  ä è  ÷      $ /  8  = A W [ f  o  t x Š ¸ Þ ý  < _ j n r  ‰ — ¥ ¯  È  Ö  Û ä  'AK\g|˜®¹½Á Øæô % 3 <@O X ]aj o…‰ ˜ ¡ ¦ ¯ ¶¿àõ Kmƒ™§®»ÉÏê8QxG Lp¤hmount.o/ 1341843649 1000 1000 100644 21092 ` ELFŒ;4(U‰ÍWV‰ÆS‰Óƒì‰$èüÿÿÿ‰\$‰4$‰Çèüÿÿÿ…ÀuëJ´&ƒÀ‰\$‰$èüÿÿÿ…Àt09Æt€xÿ,uã€<8=uÝD8…Àt‰l$ÇD$‰$èüÿÿÿ‰D$0‹D$0ƒÄ[^_]ÃWV‰ÆS‰Óƒì‰$èüÿÿÿ‰\$‰4$‰Çèüÿÿÿ…À‰Áuë8ƒÁ‰ $‰\$èüÿÿÿ…À‰Át#9ñt€yÿ,uá¶9„Àt<,uՃĸ[^_ÃÄ1À[^_ô&UWVSƒì\‹l$p‹t$t‹\$xèüÿÿÿº¤÷ʼnï…Í÷Ç…Ù‰Ñ1ÀÁéöÂó«tfǃǃâtÆÇ$èüÿÿÿ‰Ç‰$èüÿÿÿ¹º‰<$‰Øè‘þÿÿ¹º‰Ç‰$‰Øè{þÿÿ¹º %ÿ‰…ˆ‰Ø‰<$è\þÿÿ%ÿ‰…Œèüÿÿÿ¹ º‰$‰Øè8þÿÿ‰…èüÿÿÿ¹ º‰$‰Øèþÿÿº‰…”‰Øè‡þÿÿº‰Ç‰…˜‰Øèsþÿÿ‰… ‰|$‰4$èüÿÿÿ…À‰E„>Ç$èüÿÿÿ…À‰Â‰E„´1À‰×¹€ó«‰T$ÇD$ ÇD$ÇD$‹E‰$èüÿÿÿ‹}ÇD$ÇD$1G‰$èüÿÿÿ…À…5€i…k€h…a€n…£¶Ol¶WmƒøÆ¾‰ðÓà‰ÑÓà‰$èüÿÿÿ…À‰Ã‰…„„7¶Ol1ÿÓæ‹M‰òÁú‰t$‰L$H‹L$HÇD$ ÇD$‰\$‰ $‰T$<‰t$,‰t$81öèüÿÿÿ‹L$,‰$‰L$èüÿÿÿ‹T$<‰l$LÇD$( ‰\$0‰T$D‰D$4‹D$8‹l$4‰D$@‹L$@‹\$D‹D$0ñ‰L$ ‹L$,û‰D$‰\$‰L$‹L$H‰ $èüÿÿÿ‹L$,‹D$0‰l$‰L$‰$èüÿÿÿt$8|$<ƒl$(‰Åu§‹L$,‹\$0‰D$4¸ ‹l$L÷l$,‰L$‹L$H‰\$‰D$ ‰T$‰ $èüÿÿÿ‹L$<1ÒÁù‰ÈƒàD$8T$<¬ÐÁú‰Çƒú‰Ö|JŽ®‹9T$4…æ‰Ø¹‰l$(1Û‰ýëƒÁ‹PƒÓƒÀ9T$4…º‰÷‰ê1ß1Ê ×uÞ‹l$(‹U¸¶JlÓà¶Jm‹•„ÇD$Óà‰$‰D$èüÿÿÿÇ$Dèüÿÿÿ…À‰Ã‰E„ 1À¹‘‰ßó«ÇC,‹E‹P`fÇC@‰S(‰S‹@`‰Âƒâ÷ƒú÷„e‰Ú1ö1ÿƒÆ‰T$ƒ×‰D$‰,$èüÿÿÿ‰Âƒâ÷ƒú÷‹UuÝ‹E‰T$(¶Hl¶Pm¸Óà‰Ñ‰úÓà‰ÁÁù¯Ð¯ÎÑ÷æʉC0‹D$(‰S4Ç@8Ç@<‰$èüÿÿÿ‹E‰,$‰D$èüÿÿÿ…Àu~‹M…É„‹U…Ò„‹Eö@j…*‹…˜…Àt1ÀƒÄ\[^_]ö‹EfƒHjÇD$ ÇD$ÇD$‹E‰D$‹E‰$èüÿÿÿ‹E‰$èüÿÿÿ…Àt¯‹E‰,$‰D$èüÿÿÿ‰,$èüÿÿÿ‹E‰$èüÿÿÿëv‹l$(‹D$4‰T$Ç$ȉD$èüÿÿÿ‹…„‰$èüÿÿÿ‹E‰$èüÿÿÿ‹E‰$èüÿÿÿƒÄ\¸ûÿÿÿ[^_]Ãv‹½˜…ÿuæº%‰Øèúÿÿ…ÀtÖÇD$‰4$èüÿÿÿ…À‰Et¿Ç$èüÿÿÿÇ…˜Ç…œélûÿÿfÇ$ôèüÿÿÿéÅþÿÿ´&ƒø†ýÿÿéDýÿÿf}²£÷ÇÆE„*úÿÿvfǃêƒÇéúÿÿ‹E‰$èüÿÿÿ‹E¶Ph‰T$¶@iÇ$€‰D$èüÿÿÿ‹E‰$èüÿÿÿ¸ûÿÿÿéSþÿÿ‰\$(1À1Òéäýÿÿ‹E‰$èüÿÿÿ‹E‰$èüÿÿÿ‹E¶@nÇ$:‰D$èüÿÿÿ¸ûÿÿÿéþÿÿ‹E‰$èüÿÿÿ‹E‰$èüÿÿÿ‹E¶Pl¶@mÇ$VЉD$èüÿÿÿ¸ûÿÿÿéÒýÿÿ‹E‰$èüÿÿÿ‹E‰$èüÿÿÿÇ$`èüÿÿÿéaþÿÿ‹E‰$èüÿÿÿÇ$0èüÿÿÿ¸ôÿÿÿéŠýÿÿÇ$¨èüÿÿÿéÈýÿÿ‹E‰$èüÿÿÿ‹E‰$èüÿÿÿÇ$¨èüÿÿÿ¸ôÿÿÿéMýÿÿ‹…„‰$èüÿÿÿ‹E‰$èüÿÿÿ‹E‰$èüÿÿÿÇ$qèüÿÿÿ¸ôÿÿÿéýÿÿÇ$ŽèüÿÿÿéQýÿÿVSƒì$‹\$0‹C‰$‰D$èüÿÿÿ‰$èüÿÿÿ‹C‰$èüÿÿÿ‹ƒ˜ÇC…Àuf‹Cfƒ`jý‹C€xpÿt%‰$èüÿÿÿ‹s‹N\‰Ê)ÂkÂd‰ÊÑêÐ1Ò÷ñˆFp‹CÇD$ ÇD$ÇD$‰D$‹‰$èüÿÿÿ‹‰$èüÿÿÿ‹‰$èüÿÿÿ‹ƒ„lj$èüÿÿÿ‹Cǃ„‰$èüÿÿÿ‹CÇC‰$èüÿÿÿ‹CÇC‰$èüÿÿÿÇCÇC ƒÄ$[^Ãumaskdmaskfmaskuidgidronoatimero_fallbackEXFAT unsupported FAT count: %hhutoo big cluster size: 2^%dfailed to allocate root nodeupcase table is not foundclusters bitmap is not founddevice is write-protected, mounting read-onlyfailed to allocate memory for the super blockexFAT file system is not foundunsupported exFAT version: %hhu.%hhufailed to allocate zero sectorinvalid VBR checksum 0x%x (expected 0x%x)volume was not unmounted cleanlyyr¢Ï­ 6Õ0ÖI› >intûºÝ8aó‡0ˆ0$‹0¦‰Žoý㕦ÒÑZ”š¶Z#Ì#\Ì#‡Ì# …Ì#åÌ# Ì#•Ì#ÅÌ# *Ì#$Ì#(< Ì#,É"Ø#0$Þ#4½&Z#8a*Z#<ô,›#@Ñ0>#D11L#Fq2ä#G[6ô#H?­#LjHÊ#TqIÊ#XxJÊ#\KÊ#`†L%#d¦NZ#h®Pú#l I´ f ºØ »Ø# þ¼Þ# ¾ÀZ#¡Ù Òô ¸š Ò  ¸'Ò]­!B… Qz£L¿Gú17|2>”40*;h P‹ Ñ PS#ª Pt Q­ ­ Q^#³ Q– RÏ Å Ri## R¸ ^ 1  • 3H# g 4H#³ $1 S &1#  'A# > (Q#  )Ï#@  *Ï#H × +­#P ˜ ,­#T µ -­#X { .­#\ ì /­#` A 0­#d õ 6å#h – 7‹#j š 8H#l … 9H#m R :H#n @ ;H#o i ‹#þ HA ¸ HQ ¸ Ha ¸4 Hr¸ŒD 5R ¨ 7R#  8R# = 9R# ‚ :R# è Ú# ó ?Ú# · @# 0 AÚ#(  BZ#, - Ci#0 ¿ D6#8 T D6#< ù EX#@r ‹i¸ Q¸ 0 SÚ# - T^# Ë U¸# × V^#  WZ#H ¤ J£dev L©#sb M¯# \ Nµ# g O%#  PR# › Yi#  Z»#( 3 \Ê#„ è ]Z#ˆ ó ]Z#Œuid ^+#gid _ #”ro `Z#˜ Š aZ#œ L bZ# Ò£ ‹ ÒË ¸ZÒvZçefvçí¾0 US v U‹ Y‹1v YSt Y‹* V^Lv V­H+ ˆ@+ + p- c.%ë6Z‡ @6 Œ6 ¸Ê7Zä7Z‘p9 PL W9o h]< W!sh!|“"Ì@ #ts"#å\ #tv#ts$?å#ts$o#t0#tuY@Z€é±! @@ a@ ¦%pB ë&cC%B"’Ìó #ts" å #tv#ts$·å#ts'æLZ efLZ @L ONZOZ¾8]Z§ dev]©T]ÊÜ^m`^iaZÅiÙ efçâiìÚ}|Zõ ef|ç(2‰Zð ke)ef‰Z ‘w‰ ‘@‰ ‘%rc‹ZN*Ãñ! EÈ 8 w. Û E!C V!N t"Q+ª #t0"[+¿ #tw"oˆè #Ps#R#Q8#tw"…ˆ #Ps#R#Q8#tw"¤ˆ: #Ps#R #Q8#tw+´D"Ȉe #Ps#R#Q:+ÓS"çˆ #Ps#R#Q:"ù‡ ­ #Ps#R$ ‡ #Ps#R,` Ñá ‡ ’| âq H-@!’ £! +"8b2 #t‘X#ts#t‘H"H…P #ts#t‘¼" bw #t‘X#t‘@#t‘¼"¸¢ #t‘@#t‘¼#tu"þbà #t‘X#ts#t‘¼$4Ä#tÈ#t‘D,§ Ü€é'¸ W- ! ¡!Í á$Ù#tu,Ù ‰ÀþŸê ˸톊 ¸í.Ü.Ü"â#t +í)$ÌA#tô+V"`Ä#tv#tw"6}Ú#t "ubð#t "“–#tw#t1#t8+â}"œ¸2#t0"¨}H#t D"`Ù_#t‘¸"oñt#tu"‰#tu"'ž#tu+;+B;+MP+X;"~‡ ß#Ps#R%"’`ú#tv#t1"¥A#t+P":Ä3#t€+E;+gP+r;"‰Äf#t:+žP+©;"ÆÄ#tV+ÛP+æ;"òĺ#t`+P"ÄÛ#t0"$Äó#t¨+4P+?;"KÄ#t¨+c;+nP+y;"…ÄP#tq$›Ä#tŽ/\ ™0ef Z 12î^2i^3o# ­ B²4ef#Z ‘5eËà)Qsž6í !½7‹$õh#ts8Ë B    B .Ü.Ü"8 E#t +B )"¸f#ts"À'{#ts+Ë;+L P+` ;+u ;+‡ ;+™ ;9q¥Þ9‘¦Þ:Ž %å; :{ VÌ; ; <¯ ¸¦%; ;%;ZÌ:*:D;=9¹z=_¿…>Ë ƒ…;©;Ê;%;< ¦^¢;A;%<H §^Ä;A;%;^>© vÙ; ?<¬ –Úû;ç;û;Úr>t …);©;A;%;<~ ZA;©>z xV; ?@ É<% }©}; ;Z: ×Ê–;%< DZ¸;A;A;%AÄÊÙ;Ê;Z;¸<c ³Rñ;R<’ µZ;Z ;R>X ´';Z ;R>' ¶;;Z Bî èP;Ê<% ~Zh;©CB œ^;ç% : ; I$ > $ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I& : ;  : ; !I/ : ; I8 < .: ; ' I : ; I4: ; I: ; I4: ; I.: ; ' I@—B : ; I: ; I 4: ; I 1X Y 1 !41"‰‚1#Š‚ ‘B $‰‚1%4: ; I&4: ; I'.: ; ' (.? : ; ' I@—B ): ; I * : ;+‰‚1,1RUX Y - U.1/.: ;' 0: ;I1 24: ;I3.? : ;' @—B 4: ;I 51RUX Y6 74181X Y94: ; I? < :.? : ;' I< ;I<.? : ; ' I< =.? : ;' I< >.? : ; ' < ?@.? : ; ' < A.? ' I4 < B.? : ;' < C.? : ; ' I< ttt t t zt0z{t{|t|}t }~t~tP|V|óPŸR{S{óRŸQ~U~óQŸR{S{óRŸP|V|óPŸ#3P3>pŸ?WP"P"}W€t‚t‚…t …ŠtŠÖt ÖÜtÜÝt ÝÞtÞàtàãt ãætæçt çètèét€‘P‘ÝVÝßóPŸßçVçéóPŸ€‘R‘ÜSÜßóRŸßæSæéóRŸ¤¨P¨«Q«¶qŸ»ËPËßQßåPåéQ›ŸPŸÞWßèWðñtñòtòót óôtô÷t÷¥tð¥¦t¦§t§¨t ¨©t©°t°[tð[atabtbct cdtdhth tðoŒP#PšPEæSæe‘e¾S¾æ‘OSO\‘\S ‘ElUle‘e¾U¾æ‘OUO\‘\U)‘)UUU ‘SZPZ{W{€P€W ¢‘HªX‘H¾æ‘HO\‘H)‘HU ‘H 7P7pSp¢‘@ªX‘@¾æ‘@O\‘@)‘@U ‘@ 7Q7¢‘XªX‘X¾æ‘XO\‘X)‘XU ‘XdhPhp‘DpÇUÇÚPÚÞUÞ¢‘DªX‘D¾æ‘DO\‘D)‘DU ‘Ddp1ŸþG0ŸÑæ0ŸÙ¢UªU¾ÑUO\U)U UÙð žú@V“W“O\ žÜPPOUPU\u#`‰¢UªñU¾ÑU ¡t¡¢t¢¥t ¥ª t0ª « t « ¬ t¬ ­ tØ« S« ­ ‘õ P­  %3PX8Tn4Øè %3PX8Tn4ØèÜ@ ¢O\Ü@ ¢O\‰ °íÀØËÑØB @û libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/include/usr/include/i386-linux-gnu/sysmount.cstddef.htypes.hlibio.hstdio.htypes.htime.hstdint.hbyteorder.hexfatfs.hexfat.hstring.hstdlib.hstat.hunistd.h7vÈ„r0%ó JLuË „r0"JgI†:Z/À¬t½Y@=Ùƒ=/Ÿ­LׄVhuWƒ8È»-= f»-Yl®'&ž¦¦ <K-ƒ f·JÉ.-’‚îJ’JîžKI¸JZ.Y%ò[t%J^<"J^."‚^.uá[+45.ºd¬íò.»-Yn­Ëd=º~f>?G?µÈ:>H>uv„åL±†¬Ë€ž .ú~Ö;tX*…¬Påƒé~<˜t×­®;YŠ‚žôó-=0»džmt"ò#(®;®­4ž¸~J˜­­g£­®«"ež­­u­»מ»PX­­»ž×­­»ž».XXKåƒh¬fgtN;]”ƒgÛ~f&±ž eg„;Ÿ„;u„;uƒuu__off_t__gid_tmalloc_chainoption_namele32_to_cpusize_tnextexfat_count_free_clustersfinalize_super_block_shortbufstrstrprev_IO_read_base_IO_buf_baselibexfat/mount.cle32_tlong long unsigned int__u16fat_sector_startdmaskfree__uid_tlong long intsigned charboot_signature__mode_tsizeexfat_mount__unused1__unused2fat_count_IO_read_endallocated_percentcluster_countlong intexfat_cache_directoryparentstrtol_flags_fileno_IO_buf_end_cur_column__quad_tparse_options_old_offset_offsetsector_countexfatoff_tgid_texfat_reset_cachegeteuidvolume_serialsys_umaskmatch_option_IO_markerstdinspecuint16_tspc_bitsstrlenminorlong unsigned int__u32exfat_super_blockrootdir_sizecommit_super_block_IO_write_ptrfmaskname_sbuflabeluid_tcluster_toem_namele64_t_IO_save_baseverify_vbr_checksumnoatimesector_lock_flags2totalexfat_unmountprepare_super_blockstdoutfat_sector_countexfat_errorcluster_sector_startbase/home/thomas/source/exfat-utils-0.9.7versionsizetypeexfat_nodeexfat_tzset_IO_read_ptruint64_tzero_clusterdrive_no_IO_lock_tatime_IO_FILEexfat_get_nodeGNU C 4.7.1exfat_fsyncro_fallbackvolume_statetime_tle16_tfptr_cluster_poserror_markersexfat_devsector_sizereferencesentry_clusterdirtyopt_umaskunsigned charchildexfat_openstart_clustershort intget_optionjumpexfat_put_nodeupcase_charsexfat_pwriteexfat_vbr_start_checksumsector_bits_modeexfat_next_clustermtime__u64chunkcharunsigned int__time_trootdir_clusterfptr_indexmemcmp_next__off64_tcpu_to_le16umaskle16_to_cpu_IO_save_endshort unsigned intupcaselength__pad1__pad2__pad3__pad4__pad5default_valuecmap_IO_write_end_unused2entry_offsetmemsetexfat_preadchunk_sizeclustersget_int_optionuint8_t_IO_backup_basesector_startflagsexfat_close_vtable_offsetoptionsexfat_vbr_add_checksumgetegidmajorvbr_checksumexfat_warn_IO_write_baseuint32_trootGCC: (Debian 4.7.1-2) 4.7.1zR| ˆ8A…C ‡A†CƒE0mAÃAÆ AÇAÅDX€iA‡A †CƒE L Fà AÆAÇB CCà AÆAÇT ð°A…A ‡A†AƒCp® AÃAÆ AÇAÅG « FÃAÆ AÇAÅD (ø  A†A ƒC0 AÃAÆ.symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.1.rodata.str1.4.rel.debug_info.debug_abbrev.debug_loc.rel.debug_aranges.debug_ranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@­  ÄCð%ð +ð 02ð Å?2¸ RÍ }N ´Fx ^J!šlä$Ð{´- w ,R ŠÔ-øœÌ.˜ )I+T)sŽœ¡,ÃÈ,+-6*A)c+n)|…*š+¥)·Â*×+â)éî*þ+ * *0+;)BG*_)j+u)|*’—*´'¼(Ç)ñ.4 %> &H +\ )q )ƒ )• ) !&3:AHOVdkp{†‘œ©®»ÀÕÚçö#2AP_n}Œ›ª¹È׿õ"1@O^m|‹›¢®¼Ê!,7IT_j}ŒŸ®ÁÐÛîü &4BP^lzˆ–¤²ÀÎÜêø"s€Žœª¸ÆÔâðþ (6Dr€Žœª¿æô,;J…”¤Ìó2M^i}‰”˜œ ¦° µ¿ ÄÎ Óðô       '  , A ] p ˆ “ — ›  ¥ ¯  ´ ¾  Ë  Ð Ú  ß ô  " 9 D O a } ˆ “ ¨ à Î Ú ÷     ! / F  K R [ _ n  w  | € ‰  ’  — « À × é   ) ; D [ f o † ‘ ¨ ® Á Í Ñ  à  é  ò  ÷     3 Q x ž Ä Ò æ ê  ù  þ    ,0 ? HLW[j€‹™ ©ÅÛñ 3I`uŠŸ¨±ºÃÚàû .4=FOagpy‹‘𣵻ÄÖÜîôý'09KQ_f€Œ›£§« ÇË Û àäñ û!0FRg|…Ž— ©³ÀÎç-FUd‡¤ÆÛ+CXb˜ºÛó)=Rj M \¤ünode.o/ 1341843650 1000 1000 100644 63416 ` ELF¡4(ƒìÇ$D‰\$‰|$èüÿÿÿ…À‰Ãt¹‘1À‰ß󫉨‹|$‹\$ƒÄÃfÇ$èüÿÿÿëâv¼'ƒì,‰T$‰$‰\$ ‰Ã‰t$$‹t$0‰|$(‹|$4èüÿÿÿ‰T$‹S‰D$¸¶JlÓà¶Jm‰4$‰|$Óà‰ÂÁú‰D$‰T$ èüÿÿÿ‹\$ ‹t$$‹|$(D$T$ƒÄ,ô&¼'S‰ÃƒìÇÇ@Ç@Ç@ ‹@‰$èüÿÿÿÇCƒÄ[ô&V‰ÆS‰Óƒì·B‰F,¶B‰D$·B f‰D$·Bf‰$èüÿÿÿÇD$‰F8·Cf‰D$·Cf‰$èüÿÿÿ‰F<ƒÄ[^ô&ƒì<öÁ‰\$,‹\$@‰t$0‰|$4‰l$8„£‰‰Õ‹PÁé¿ƒá‰ÆÇC‰øÇC‰K ¶JlÓà¶JmÓà‰$èüÿÿÿ…À‰CtN‰l$‰4$èüÿÿÿ‹n‰D$ ‰T$¶MlÓç¶MmÓç‰|$‹C‰D$‹‰$èüÿÿÿ1À‹\$,‹t$0‹|$4‹l$8ƒÄ<ÃÇ$(èüÿÿÿ¸ôÿÿÿëÙÇ$èüÿÿÿƒìL‰t$@‹q‰|$D‹y‰T$,‹P‰\$<‰ËƒÆ ƒ×‰l$H‰Å¸‰q‰y¶JlÓà¶JmÓàƒè‰Á!ðÁù‰Ê!ú Âu ‹D$,;x4v1À‹\$<‹t$@‹|$D‹l$HƒÄLösf‹‰,$‰D$‹D$,‰D$èüÿÿÿ‰Âƒâ÷ƒú÷‰tT‰D$‰,$èüÿÿÿ‹u‰D$ ¸‰T$¶NlÓà¶NmÓà‰D$‹C‰D$‹E‰$èüÿÿÿ1Àë€f;p0ƒsÿÿÿët&Ç$èüÿÿÿ¸éXÿÿÿv¼'UWVS‰Ãƒì\‰Ø‰T$t$<‰L$,‹J,‹R(‰4$èûýÿÿ…À‰D$(…¯1ít&…í„`‹t$@‹|$D‹S¸ƒÅ¶JlÓà¶Jm‰4$‰|$Óà‰ÂÁú‰D$‰T$ èüÿÿÿD$L¾Áø÷Ð!Å;l$t„0‹T$ƒÆ ƒ×‹B0‹R4‰D$ 9׉T$$r wB9Æs>¶‹T$L$<‰Øè)þÿÿ…À„iÿÿÿD$<è¨üÿÿÇD$(ûÿÿÿ‹D$(ƒÄ\[^_]Ãt&‹s¿‹D$ ¶NlÓç¶NmÓç‹L$t‰úÁúƒÀÿ‰T$‹T$$‰|$‹t$‰|$ƒÒÿD$T$)éÁá1ÿÈú‹|$‰t$‰$‰T$‰|$ èüÿÿÿ‹L$‰$¯T$¯ÈÑ÷d$ʉT$ ‹T$‰D$‰T$èüÿÿÿ…À„.ÿÿÿ‰ÆD$<èëûÿÿ‰t$(éBÿÿÿf‹D$<‹L$,‹t$@‹|$D‰‹D$p‰0‰xéˆþÿÿD$<è·ûÿÿ‹D$(ƒÄ\[^_]Ãt&¼'U‰ÅWVSìl‹¼$€X(‰T$,‰L$8ÇfÇD$DfÇD$FÇD$0ÆD$7‰\$@t&‹D$,‹W‹_;P4r>v7€|$7„¸¶D$7»ûÿÿÿÇ$6‰D$èüÿÿÿ‹L$8‹釴&;X0sÄ‹u¸¶NlÓà¶Nm‰$‰T$Óà‰ÁÁù‰D$‰L$ èüÿÿÿ‹_ö<ƒ„æw\<„<‚f„²„Àˆåf‹T$,‰ù‰èèüÿÿ…À„Cÿÿÿ‹L$8»ûÿÿÿ‹‰$èüÿÿÿ‹L$8ÇÄl‰Ø[^_]Ã<À„p<Á„¸<…u¢€|$7…_¶C<ˆD$7†ö·s‰$èüÿÿÿf‰D$Dè[ùÿÿ‹L$8…À‰„Æ‹‹O‰P‹W‰H$‰P ‰ÚèEúÿÿ‹L$8f‰t$F‹ ƒÁ@‰L$0é>ÿÿÿ¶¶C<‡eƒÃ‰\$‹\$@ÇD$ ÇD$[‰$èüÿÿÿ…À„ÿÿÿéÿÿÿt&€|$7v„â·D$D‰$‰D$èüÿÿÿ‹Sf‰D$DC‹\$0‰‹P‰S‹P‰S‹P ‰S ‹P‰S‹P‰S‹P‰S·@f‰CƒÃ€l$7‰\$0…Šþÿÿ·D$Df9D$F„™·D$F»ûÿÿÿÇ$ ‰D$·D$D‰D$èüÿÿÿ‹L$8‹élþÿÿt&€|$7†Q¶C¨ü…ê‹L$8‹S‹‹K‰P0‰H4‹S‰P(‰PöC…Ä·D$D‰$‰D$èüÿÿÿ‹K‰L$<‹L$8f‰D$D‹C ‹1‰D$$‹L$$‹F4‹V01Á‰L$H‹L$<1щL$L‹L$H L$L…?‰Á Ñu ¶KöÁ…ÝöF,t8‹]¶Kl»Óã‹M¶Im‰$‰D$Óã‰ÙÁù‰\$‰L$ èüÿÿÿ Â…¿€l$7é_ýÿÿ´&‹E…À…Mýÿÿ‹Cƒø÷„Dƒøÿ„;‹S‹C‰Ñ Át ƒú†ç‰D$»ûÿÿÿ‰T$Ç$dèüÿÿÿ‹L$8‹éýÿÿ´&‹Cƒø÷„Žƒøÿ„…‹F\PþƒÀ‰U‹KÁè‹s…ÉtR‹s‰U ‰u‹C‰$èüÿÿÿ…À‰E„„‰t$‰,$èüÿÿÿ‰D$ ‰T$‹C‰D$‹E‰D$‹E‰$èüÿÿÿéyüÿÿ9ðvª‰D$ »ûÿÿÿ‰L$‰t$Ç$Üèüÿÿÿ‹L$8‹élüÿÿt&H,é0þÿÿ=þÿ‡ÿÿÿ¨…ÿÿÿ‰$èüÿÿÿ…À‰E‹C‹S„K¬Ð‰E ‹C‰,$‰D$èüÿÿÿ‰D$ ‰T$‹C‰D$‹E‰D$‹E‰$èüÿÿÿéÔûÿÿ»þÿÿÿéüûÿÿ‰L$»ûÿÿÿÇ$Èèüÿÿÿ‹L$8‹éÊûÿÿ\$_‰\$ÇD$‰4$èüÿÿÿ‹L$8‹‹P4‹@0‰\$»ûÿÿÿÇ$ô‰T$ ‰D$èüÿÿÿ‹L$8‹é~ûÿÿÇ$¸»ûÿÿÿèüÿÿÿ‹L$8‹ébûÿÿ¶D$7»ûÿÿÿÇ$(‰D$èüÿÿÿ‹L$8‹é=ûÿÿ‰D$Ç$£èüÿÿÿéûÿÿÇ$o»ûÿÿÿèüÿÿÿ‹L$8‹é ûÿÿ¶D$7»ûÿÿÿÇ$X‰D$èüÿÿÿ‹L$8‹éçúÿÿ‰D$»ûÿÿÿÇ$‡èüÿÿÿ‹L$8‹éÇúÿÿ1À»ôÿÿÿé»úÿÿ‰D$»ûÿÿÿÇ$Rèüÿÿÿ‹L$8‹é›úÿÿ‹L$$‹\$<‰D$‰T$ ‰L$‰\$»ûÿÿÿÇ$˜èüÿÿÿ‹L$8‹égúÿÿ‰D$»ûÿÿÿÇ$xèüÿÿÿ‹L$8‹éGúÿÿ‹C‹S»ôÿÿÿÇ$‰D$‰T$èüÿÿÿ‹L$8‹éúÿÿÇ$D»ûÿÿÿèüÿÿÿ‹L$8‹éúÿÿ‹T$,‰ù‰è1Ûèòõÿÿ…À…ßùÿÿé÷ùÿÿ‰D$»ôÿÿÿ‰T$Ç$ˆèüÿÿÿ‹L$8‹éÁùÿÿ‹D$ƒ@ô&UWVSƒìL‹t$dÇD$‹N,÷Át‹D$ƒÄL[^_]ö‹V(|$,‹D$`‰<$èôÿÿ…À‰D$uÓ‹l$`1Û´&‰<$L$(‰ò‰èè8øÿÿ…Àu‹D$(…Û‰0t ‰C‰X ‰ÃëØ‰F‰Ãëщʼnøè¯óÿÿƒýþt:‹V…Òtv‹B‰$‰D$(èüÿÿÿ‹T$(…ÒuéÇF‰l$‹D$ƒÄL[^_]ÃfN,éBÿÿÿt&ƒì,‹L$<‰\$‹\$0‰l$(‰t$ ‹t$8‹‹Q‹k‰|$$¿ƒÀ ƒÒ‰‰Q¶MlÓç¶Mm‰$‰T$Óç‰ùÁù‰|$‰L$ èüÿÿÿ Âu‹‰$‰D$‹D$4‰D$èüÿÿÿ‰‹\$‹t$ ‹|$$‹l$(ƒÄ,Ãt&U‰ÕWVS‰Ãƒì<‹B|$#‰D$$‹B ‹R$‰D$(E@‰$‰T$,èüÿÿÿ¹‰ˆˆˆÆD$#p‰ð÷á‹D$(‰Ö‹T$,‰$‰ØÁî‰T$‹T$$èññÿÿÇD$‰|$‰D$ ‹‰T$‰$èüÿÿÿT$$D$(‰T$‰D$ ‹E‰$‰D$èüÿÿÿ‹T$,‹D$(ÆD$#@‰T$‹T$$‰$‰Øè•ñÿÿÇD$‰|$‰D$ ‹‰T$‰$èüÿÿÿ…ö„h´&T$$D$(‰T$‰D$ ‹E‰$‰D$èüÿÿÿ‹T$,‹D$(ÆD$#A‰T$‹T$$‰$‰Øè*ñÿÿÇD$‰|$‰D$ ‹‰T$‰$èüÿÿÿƒîuŸƒÄ<[^_]Ãë UWVS윋´$°‹œ$´‹Ž˜…É…2‹…Ò„‹K‹C ‹S$‰L$D‰D$H‰T$L‰$‰ð‰T$‰Êè›ðÿÿ‰D$0D$H‰D$ D$D‰D$‹‰4$‰T$4‰D$èüÿÿÿ‹T$L‹D$H‰T$‹T$D‰$‰ðè[ðÿÿ‹l$4‹|$0ÇD$ ‰l$l$P‰|$ ‰l$‹‰D$,‰T$(‰ $èüÿÿÿ¶L$P‹D$,‹T$(€ù……—·K,f‰L$TL$e‰L$ L$\‰L$L$^‰L$‹K8‰D$,‰T$(‰ $èüÿÿÿL$`‰L$L$bÇD$ ‰L$‹K<‰ $èüÿÿÿ‹D$,L$p‹T$(ÇD$ ‰L$‰D$ ‰T$‹‰ $èüÿÿÿ¶L$p‹D$,‹T$(€ùÀ…ð‹{0‹k4ÆD$q‰|$x‹|$x‰l$|‹l$|‰¼$ˆ‹{(‰¬$Œ‹k4 k0‰¼$„t öC.tÆD$qk@L$>|$p‰l$ l$P‰|$‰l$‰ $‰D$,‰T$(èüÿÿÿƒì‹l$4·L$>‹|$0ÇD$ ‰l$l$Pf‰L$R‰|$ ‰l$‹‰ $èüÿÿÿ‹D$,‹T$(ÇD$ ‰D$ D$p‰T$‰D$‹‰$èüÿÿÿc,ÿÿûÿÄœ[^_]ÃÇ$xèüÿÿÿ‰L$Ç$Ûèüÿÿÿ‰L$Ç$½èüÿÿÿ¶¿ƒì‰\$‹\$$‰t$‹t$ ‹Cƒèƒø‰CŒ‹u‹C,©ug©u0‹^$…Ûu‹\$‹t$ƒÄÃt&‰t$ ‹\$‹t$ƒÄéüÿÿÿt&‰\$ÇD$ÇD$ ‰4$èüÿÿÿ‰$èüÿÿÿ‹^$…Ût¬ë»v‰\$‰4$èüÿÿÿ‹C,©tŠë¸‰Øèüÿÿÿ‰ö¼'UW‰ÇV‰ÖSì,‹Z…Ûtv‰Ú‰øèßÿÿÿ‹k‰$èüÿÿÿ…í‰ëuæ‹n…íu'ÇFÿÿÿÿÇFf,ÿÿýÿÄ,[^_]ô&\$ÇD$‰\$‰4$èüÿÿÿ‹F‰\$Ç$ ‰D$èüÿÿÿ‹FPÿ…À‰Vt¤t&‰t$‰<$èüÿÿÿ‹VBÿ…Ò‰Fuçë…t&‹D$‹Pé4ÿÿÿt&‹T$‹D$‹ ‹RH,‰H<‰P8Ãt&SƒìÇ$‹\$ èüÿÿÿK,‰C<ƒÄ[ö¼'SƒìÇ$‹\$ èüÿÿÿK,‰C8ƒÄ[ö¼'UWVS‰ÃìÜD$L‰D$´$ÎD$H‰T$‰t$ ‰D$‰$f‰L$,ÇD$P÷ÿÿÿÇD$XÿÿÿÿÇD$\ÿÿÿÿèüÿÿÿ…À‰D$(…d‹D$L…À…h‰4$½‰ˆˆˆèüÿÿÿL$PP‰Ð÷åD$X‰$‰ØÁêƒÂ‰T$‹T$Hè´îÿÿ…À‰D$(…‹D$P‹L$H‹T$\‰4$‰D$T‹D$X‰L$4‰T$d‰D$`èüÿÿÿ‰D$0ƒÀ÷å‰Õè ëÿÿÁí…À‰Ç„9‹D$TO@‹T$d‰L$8‰G‹D$`‰W$‰G ‹D$0‰ $‰t$À‰D$èüÿÿÿT$n¹ ö‰T$$…æ‰Î1ÀƒæüǃÀ9ðròƒátfÇ·L$,EÇ$ÆD$n…ˆD$of‰L$rèüÿÿÿ”$‚‰T$ T$v‰T$T$x‰T$‰$èüÿÿÿ·D$xŒ$ŽöÁ‰Îº f‰D$|f‰„$€·D$vf‰D$zf‰D$~¶„$‚ˆ„$ƒ…Q‰Ðƒàü‰D$,1ÀǃÀ;D$,rðƃâtfǶT$0t$>‰\$‰4$‰L$ ˆ”$‘‹T$8Æ„$ŽÀÆ„$‰T$èüÿÿÿƒì·D$>‹L$ ‹T$8‰4$f‰„$’D$n‰L$‰T$ ‰D$Ç„$¢èüÿÿÿƒì·D$>‹T$df‰D$p‹D$`‰T$‹T$T‰$‰Øè­éÿÿÇD$ ‰D$ ‹‰T$T$n‰T$‰$èüÿÿÿD$`‰D$ ‹D$4T$T‰T$‰$‰D$èüÿÿÿ‹T$d‹D$`‰T$‹T$T‰$‰ØèQéÿÿ‹L$ ÇD$ ‰L$‰D$ ‹‰T$‰$èüÿÿÿ…í„(‰éÁá)é´$®‰L$0‰ñƒá‰|$8‰ÏÇD$,…ÿ‰ñ¸ …«‰Å1ÒƒåüǃÂ9êròѨtfÇ‹L$,‹T$8Æ„$®ÁDJ@‹L$`‰”$°‹P‰”$´‹P‰”$¸‹P ‰”$¼‹P‰”$À‹P‰”$Ä‹P‰”$È·@‰L$ ‹L$4‰$f‰„$ÌD$T‰L$‰D$èüÿÿÿ‹T$d‹D$`‰T$‹T$T‰$‰Øè4èÿÿÇD$ ‰t$‰D$ ‹‰T$‰$èüÿÿÿ‹L$0ƒD$,9L$,…ÿÿÿ‹|$8T$n‰øè´èÿÿ‹„$¦‹”$ªö„$‰G0‹„$¢‰W4‰G(‰GtO,‹L$4‹A‰…Àt‰x ‰G‹L$4‰y‰ $èüÿÿÿ‹D$H‰$‰D$èüÿÿÿ‹D$(ÄÜ[^_]ÉD$‰$èüÿÿÿ‹D$H‰$‰D$èüÿÿÿÇD$(ïÿÿÿ‹D$(ÄÜ[^_]Ãt&fÇŒ$°°éBþÿÿT$p±éüÿÿÇD$(ôÿÿÿé}ÿÿÿ´$²é¡üÿÿë ‹T$¹ ‹D$éžúÿÿ´&¼'UWVS‰Óƒì<‹*‹J ‰D$$‹r$ƒE‰L$ ènôÿÿ‰,$èüÿÿÿ‹C ‹S…À„ȉP‹S…Òt‰B ‹E,ÇÇC ÇC¨„»©„¼‹U…Ò„;r$})1ö‹D$$‰l$‰$èüÿÿÿ‰ðK,ƒÄ<[^_]Ãt& ‹|$ ;z r͉Ћ@…Àt'‹H$‹x 9Î|º9|$ r²;J$|à;z vۉ‹@…ÀuÙ‹B$1ÿÁø‰Æƒær z$¬þÁÿƒÆƒ×ƒÂ@‰$èüÿÿÿº‰ˆˆˆÇD$ƒÀ÷âÁê‰T$t$|$‹D$‹T$¤ÂÁà‰D$‰T$‹D$$ÇD$ ‹p¶NlÓd$ ¶NmÓd$ ‹T$ ‰Ñ‰ÐÁù‰ÖƒÀÿ‰ÊƒÒÿ‰Ï‹L$‰T$,‹T$‰D$(T$(L$,‹D$(‹T$,‰t$‰|$ ‰$‰T$èüÿÿÿ‰ù¯T$ ¯ÈÑ÷d$ Ê‰Ñ Át‰Æ‰×‹U4‹E01ú1ð „¢þÿÿ‹D$$‰t$‰|$ ‰l$‰$èüÿÿÿ‰Æé…þÿÿv‹ ‰Qé4þÿÿÇD$ÇD$é'ÿÿÿÇ$ùèüÿÿÿÇ$Ìèüÿÿÿ‰ö¼'ƒì,¹0‰t$$‹t$0‰|$(‹|$4‰\$ ‰ð‰úè+øÿÿ…À‰Ãt‰Ø‹t$$‹\$ ‹|$(ƒÄ,ÃvD$‰|$‰D$‰4$èüÿÿÿ…ÀuÓ‹V°¶JlÓà¶Jm‰4$Óà‰D$‰Â‹D$Áú‰T$ ‰D$èüÿÿÿ…À‰Ãu‹D$‰4$‰D$èüÿÿÿëf‹T$‰ðèýÿÿ‹D$‰4$‰D$èüÿÿÿékÿÿÿƒì‰\$‹\$$‰t$‹t$ öC,t?‰\$‰4$èüÿÿÿ‹C…Àu‰Ú‰ð‹\$‹t$ƒÄéÀüÿÿ¸Ùÿÿÿ‹\$‹t$ƒÄô&¸ìÿÿÿëæ‹T$‹D$öB,u éüÿÿt&¸ëÿÿÿÃfUWVSìì‹„$‹¬$ÇD$T÷ÿÿÿÇD$`ÿÿÿÿ‰D$D$H‰D$‰,$ÇD$dÿÿÿÿèüÿÿÿ…À‰ÃtÄì‰Ø[^_]Ë„$‰,$‰D$„$Þ‰D$ D$L‰D$D$P‰D$èüÿÿÿ…À‰ÃuA‹D$L…À„‰ö@,uR‹T$H»ëÿÿÿöB,„ωD$‰,$èüÿÿÿ‹D$P‰,$‰D$èüÿÿÿ‹D$H‰,$‰D$èüÿÿÿÄì‰Ø[^_]ö‹T$H»ìÿÿÿöB,t²‰D$‰,$èüÿÿÿ‰Ã‹D$L‰,$‰D$èüÿÿÿ…Ûuœ”$Þ¾‰ˆˆˆ‰$èüÿÿÿL$TP‰Ð÷æD$`‰$‰èÁêƒÂ‰T$‹T$Pèåÿÿ…À‰Ã…Wÿÿÿ‹T$H‹D$T‹L$P‰T$,‹T$d‰D$X‹D$`‰L$0‰T$l‹T$,‰D$h‹B‰D$\‹B ‹R$‰D$p„$Þ‰$‰T$tèüÿÿÿ‰Á@÷æ‹D$p‰L$ t$~‰×‹T$t‰$‰èÁï‰T$‹T$\è|áÿÿ‰t$´$žÇD$ ‰T$‰D$ ‹E‰$èüÿÿÿ‹T$,D$p‰D$ D$\‰D$‹‰,$‰D$èüÿÿÿ‹T$t‹D$p‰T$‹T$\‰$‰èèáÿÿÇD$ ‰t$‰T$‰D$ ‹E‰$èüÿÿÿG”$ÞˆD$D$>‰T$‰$‰l$‰D$$èüÿÿÿƒì·T$>‹L$ ‹D$$‰t$f‰”$¢T$~ˆŒ$¡Œ$Þ‰L$ ‰T$‰$èüÿÿÿƒì·D$>‹T$,f‰„$€‰èè,îÿÿ‹L$,‹T$X‹D$h‰Q‹T$l‰A ‰Q$‰T$‹T$X‰$‰èèQàÿÿL$~‰L$ÇD$ ‰T$‰D$ ‹E‰$èüÿÿÿ‹L$0D$hT$X‰D$ ‰T$‰L$‰,$èüÿÿÿ‹T$l‹D$h‰T$‹T$X‰$‰èèôßÿÿÇD$ ‰t$‰D$ ‰T$‹E‰$èüÿÿÿ…ÿ„$kÇ´$Þ‰ñ‰\$8Á‰L$4Œ$¾‰L$(ƒá‰Ë…Û¸ Œ$¾…›‰Ç1ÒƒçüǃÂ9úròѨtfÇÆ„$¾Á‹T$X‹L$0‰„$À‹F‰„$Ä‹F‰„$È‹F ‰„$Ì‹F‰„$ЋF‰„$Ô‹F‰„$Ø·FƒÆ‰L$‰T$‰,$f‰„$ÜD$h‰D$ èüÿÿÿ‹T$l‹D$h‰T$‹T$X‰$‰èèÝÞÿÿÇD$ ‰D$ „$¾‰T$‰D$‹E‰$èüÿÿÿ;t$4…ÿÿÿ‹\$8‹|$,´$Þ¸ƒÇ@÷Ç…Ó÷Ç…ì‰Á1ÒÁé¨ó¥t ·f‰º¨t¶ˆ‹T$,‹B …À„„‹L$,‹Q‰P‹Q…Òt‰B ‹D$,‹T$0Ç@ Ç@‰‹B…Àt ‹L$,‰H ‰A‹D$,‹t$0‰Fé\ûÿÿ´&fÇ„$¾Œ$À°éMþÿÿ‰D$‰,$èüÿÿÿ‰Ãézûÿÿt&‹t$,‹V‹‰Qéxÿÿÿ‹t$,¶„$Þ‰÷ˆF@ƒÇA¸´$ßéÿÿÿ·ƒèƒÆf‰ƒÇéÿÿÿ´&¼'‹D$ƒÀ(ô&ì¼1À‰œ$¬‹œ$À‰´$°‰¼$´‰¬$¸ÇD`ƒÀƒø rð‹„$ĉ$èüÿÿÿ‹”$ÄÇD$‰T$‰D$ D$`‰$èüÿÿÿ…À‰D$,t+v‹D$,‹œ$¬‹´$°‹¼$´‹¬$¸Ä¼Ã‹C‹H,‹P(D$L‰$‰ØèÉÝÿÿ…À‰D$,…t&‹s‹|$T‹l$P;~4‚ †þD$LèõÜÿÿ‹SD$@‰$L$<‰ØÇD$èXßÿÿ…À‰D$,…dÿÿÿD$`‰$Æ„$€ƒèüÿÿÿ‹T$`‰”$‚‹T$d„Àˆ„$‰”$†‹T$h‰”$Š‹T$l‰”$Ž‹T$p‰”$’‹T$t‰”$–‹T$x‰”$š·T$|f‰”$žu€„$€€‹T$D‹D$@‰T$‹T$<‰$‰Øè±ÛÿÿÇD$ ‰D$ „$€‰T$‰D$‹‰$èüÿÿÿéŸþÿÿ´&;n0ƒùþÿÿ‹S¸¶JlÓà¶Jm‰,$‰|$Óà‰ÂÁú‰D$‰T$ èüÿÿÿD$\€8ƒtAL$L‰ò‰Øè$Ýÿÿ…À„”þÿÿD$Lè£ÛÿÿÇD$,ûÿÿÿé.þÿÿ¶ƒ|$,þ…þÿÿé‹þÿÿ‹D$L‰l$@‰|$D‰D$#d'Nl#hì Pó#l &´ _ ºÑ ‚»Ñ#  ¼×# íÀl#šÒ Ëí ±“ Ë ±' Ë ]¦ˆB‰²Q~®L¸ ùxc Çz¸# ?{Ÿ#il 1Is2PÉ4)6;0 P² a Pz# P› QÔ ¨ Q…#³ Q½ Rö ¬ R#¢ RßÈ … 11 ² 3o# ¬ 4o# $X è &X# g 'h# ¼ (x# a )ö#@ I *ö#H 8 +Ô#P  ,Ô#T Œ -Ô#X Ð .Ô#\ ¢ /Ô#` ® 0Ô#d Á 6 #h  7²#j O 8o#l V 9o#m :o#n ;o#o ‰ ²#þ oh ± ox ± oˆ ±4 o™±Œ 3 LÂ Þ No# Œ OÂ# oÒ ±  U Þ Wo# X# š YÔ# • Zö# o' ± @ ^ˆ Þ `o# aX# 2 bÔ#  cˆ# š dÔ# • eö# o˜ ± \ iÏ Þ ko#  lo# • mÏ# ²ß ± @ x° Þ zo# S {o# 2 |²# ª }²# ~²# d ²# þ ²# Ë €²# µ €²# Ê ²# Ü ²# â ‚o# › ƒo#  „°# oÀ ± R ‹Y Þ o# [ Žo# o# ¼ o# ¤ ‘²#  ’²# [ “ö# ”Y# š •Ô# • –ö# oi ± ± š  Þ œo#  o# • žÏ#8D 5€ Ñ 7€ # ü 8€ # ¼ 9€ #  :€ # O # > ?# 3 @# š A#( [ Bl#, • C#0 Ë D/#8 Ê D/#< • E† #@  ²— ± Qæ š S# • T…#  Uæ # . V…# e Wl#o [¤ JÑ dev L× #sb MÝ # B Nã # N O># Ò P€ # í Y— # © Zé #( , \Ã#„ ã ]l#ˆ  ]l#Œuid ^$#gid _#”ro `l#˜  al#œ š bl# 4 Ñ 1² Ëù ±Z z> à# v# –l#  Å#Î WY v Wö€ V…t v VÔŽŸš š efŸ¥ it °   ™« ì ¶ ù éKlì efKì dirKò itLý ì ø  ù ’ gl4 efgì Ñgò ithý ý UzO v U²¨•s 1•€ ¸–s y Àe Û½ efÛì ÑÛò àܽ vÜà ì(ä 1(€ |5 dir5€ 15€ % Y²/ v Yzt Y²# [öS v [t [öT ZÔw v Z…t ZÔ}+¨ ef+ì 1+€  y/¨ ˹ ±!#€ × 1#€ "€ F.#1€ 8$W0%t D&Dp0%t'ÞFPÂl(efFì ˜)àFÄ*vF‘&u…0%ts%tóR+j^ÐåÁ(it^ý ),ü¢0+Ë‹hU)1‹€ ±)þŒÝ,>·0&_·0%t0ß-» p? Ã.Ì C/á ‘/Ö úÖ Ÿ/Ö úÖ Ÿ,ËW0$Þ…0%tv%tu$ Ù0–%tw$,p0®%t(&?ü0%t- @F“o. Í. .) Q0 ºg.) ˆ. ¦. Æ$Ð1;%tu%t‘\$è…0P%tu,Ù0&<p0%t1˜”l±ef”ì dir”€ a•Ò •…2`œlP%äQ3efœì º3dirœ€ ÿ4འ5và ‘5l‘6itŸù ‘L7rc l?8Ú¡š 9–¢lR:t ›®~. ”;0<… :o@H·Ñ.¤#.˜\.Œq.†&Ò31%ts%t‘¨$uö%Ps%tv=Ö ‘¨$ %Ps%R‘¨%Q‘L$(,%P‘L$å@%P‘L&%P‘L'?ªl0 ™((efªì 3)Ѫò n)1«(Ž>it«ý ‘?rc­l®@Ú®š S#þ¯#¸°s +#R±.j#B²9Š#ò³D¾#© ´Oç#Sµo# #w¶ã › #™·z #œ¸zL AŒ@Bt È÷È. µ CÈ÷<… DO óh÷¶.g Þ .\  Ev  Fy¨ ‘ß}$Ž U1÷%tv%ts%t &· p0%tô%t‘ß}$®p09%t6%t‘·}”ÿ$- [%Pu%R‘¬}%Qw,H¢0$›s1y%ts,¥× $ËÁ–%Rs$‹1¸%ts%t[%t ?$G²1Û%ts%t ‘Ä}” ÿÿ$Ép0%t %t ‘Ä}” ÿÿ%t ‘Æ}” ÿÿ$%²12%ts%t ‘Ä}” ÿÿ$ p0J%td,j W0$ …0o%tu%tv,¢ Ù0$É p0%tÜ,ÿ W0$& …0®%tu,G Ù0$k p0Ï%tÈ$Ó p0ç%t¸$ø p0 %t(%t‘·}”ÿ$ p0$%t£$) p0<%to$N p0a%tX%t‘·}”ÿ$n p0y%t‡$š p0‘%tR$Î p0©%t˜$î p0Á%tx$ p0Ù%t$4 p0ñ%tD$N  %Pu%R‘¬}%Qw&t p0%tˆ€ 4i?'JÒU˜-w /> Ò. k <… C/G› ‘ï}$U1µ%tóP%ts%t &/ü0%tP%tsH¹ € ‰ tð/Ë ‘II’l l Œ ÒJef’ì ‘Jdir’€ ‘6it”ù ‘L7rc•lo 91–€ ¹ 99 —€ Ù $Ó %P‘%tw=Ö v$ø Q´%Pu%Rv%Q‘H%tw$! È%Pw,? ¢0K~ p ü R ]/ ‘/˜ ‘/¤ ‘/° ‘ L~ Ð è Û.¤ ~ .˜ ‘ . ¥ CÐ è <° &æ 1%ts%t‘MQ¸ º3efì E41€ qFà‘T9v9Ý l±F o‘S$/Ï1ê%tuÀ$_.þ%Ps$}ç1%tw%t1$œ~ <%ts%t‘T%t ‘X$».P%Ps$Ùç1k%tw%t1$~ Ž%ts%t‘T%t ‘X$&.¢%Ps&Dç1%tw%t1NÇä`äÑÉJefäì ‘51ä€ ‘9àæ…9vç²9ê èö9ÕèFþéß‘ F¸êÀ‘@$µ.e%Pv$Û~ Š%tv%t‘”%t ‘˜$õ.ž%Pv$'Ù0º%tu%t $q 2à%t‘®%t‘¬%t ‘µ$” 2%t‘²%t‘°%t 0$¾Ù0 %t‘@%t $E-2L%t‘Ž%tu%tw%t sÀ$|ç1h%tu%t $¦ç1„%t‘@%t $Äü0œ%tx$Ôü0´%tÛ&äü0%t½-w ð§0W/… ‘/ ‘OTO2$t31%tv%ts$|¢0*%ts$”ºF%tv%ts&§Z%PsMk¾°k€U3ef¾ì 41¾€ Q9üÀ€ ˆ9¼Á€ ¼E? Fy˨ ‘ß}$(U1ñ%tv%ts%t &?c2%t %ts$ÑW'%Pw%Rs$Ü¢0<%ts&\w %tw%tvPêÖp|tJefÖì ‘Q|W%P‘P㨀›tÈ51¨€ ‘Jtv¨È‘Î:N‚¯ ÃÏ51¯€ ‘&´x2%t0N¸µÐóI51µ€ ‘&äx2%t01»Él÷efÉì dirÉ€ •Ê÷àÊvʪ Êz81Ì€ 8þÍß8¸ÎÀ8¼ Ï 8Ý ÐjRiÑl8-òiý²>S9lAW"$3efì n4²¾4ª zß7dir€ ÿF€ ‘ÜzFà‘àz9v!F•† ‘Þ{7rc l6:I´ˆz#.–{.Š.~¿.rá.f).[V;°T¢tG®‘þzGº‘ž{TÆßTÒ TÞ*:O )ðû_!.g >.\ TUÌ!G鑾{$~ Ÿ!%ts%t‘Äz%t‘äz%t ‘ðz$.³!%Ps&:ç1%tv%t Vä Ž¨ýó!.þ g.ò z$ÐÏ1"%tv,à× $–2:"%t‘Èz%tv%t‘Àz1$$xx2N"%t0$› 2t"%t‘ˆ{%t‘†{%t ‘’{$A·2™"%tv%ts%t‘Èz$|-2À"%tv%t‘´z%t ‘Èz$£.Ô"%Ps$Åç1ò"%t‘´z%t $å~ #%ts%t‘Äz%t‘äz%t ‘ðz$ÿ.4#%Ps$!ç1I#%t $\Áe#%Pw%R‘´z&°%t‘Äz$PÔ2®#%ts%t‘Øz%t‘Üz%t v%tóR$uÏ1Ã#%tv$œ±æ#%Ps%Q‘àz%t‘èz$Àw û#%ts$Üw $%ts&ìw %tsW¯!lPbt}$Jef!ì ‘5²!‘Qb %P‘%R‘%Q 1 @lî$ef@ì dir@€ ‘A81Cò 85Dò 8S E8¸FRrcGl2‹ qlp§“&3efqì )41q€ H9Ñs€ 9‘t6rculVV¹ …‰wv%.Ë Ø:É š(z”%.× ö:}$µH{I&.¦$".š$].$†;pT²$¦T¾$ÚTÊ$TÖ$µTâ$Ý,~Ï1$f31&%t‘T%tu$›ü03&%tù&§ü0%tÌ$’]d&%P‘T%Rs$šy&%tu&w %t‘T%tuIˆ&l°pð'Jef&ì ‘5²&‘7rc(l(91)€ ˆ$Õ '%Pv%Rw%Q0$31'%tv%t‘l%tw$631F'%tv$Lw ['%tv$[î$o'%Pv&kw %tvIŒ‰lpϨó'Jef‰ì ‘51‰€ ‘$•ðÙ'%tv%tsQ°î$%P‘%R‘WÄ‚lÐîtJ(3ef‚ì ø41‚€ #Qãî$%P‘%R‘{ =)ef=ì dir=€ 1>€ •>÷§>(?8þAß8¸BÀ8nC8GD8¼ E 8Ý FjRiGl8-`iI¯ mlðÒ"B™-Jefmì ‘5òm‘5àm‘91o€ YFp€ ‘Ìz7dirq€ †Fàr‘Ôz9vsµF•t† ‘Þ{7rculÊ:J(z˜¢‹,.“(e.‡(”.{(Ã.o(}.c(¬.X(Ù;°GŸ(‘þzG«(‘ž{T·(÷TÃ(&TÏ(UTÛ(sTç(†:É ƒ Èif*.× šUøÕ*Gò(‘¾{$Y!~ ¦*%tu%t‘°z%t‘Øz%t ‘èz$s!.º*%Pu&™!ç1%t‘¨z%t :ä "jü*.þ Ç.ò ç$¦Ï1+%t‘Þ{$Ô.&+%Pu$úÙ0C+%t‘þz%t $~ h+%tu%t‘Üz%t ‘ðz$6.|+%Pu$UÙ0˜+%tv%t ${·2½+%t‘¾z%tu%t‘Þ{$¹-2â+%t‘þz%tv%t ‘Þ{$Ô]þ+%Pu%R‘¬z$ÿ.,%Pu$" ç1/,%t‘þz%t $B ~ ],%tu%t‘°z%t‘Øz%t ‘èz$\ .q,%Pu&{ ç1%tv%t $43°,%tu%t‘Èz%t‘$vÔ2å,%tu%t‘Ðz%t‘Ìz%t ‘Þ{%t‘$­w ú,%tu$½w -%tu$Íw $-%tu$û'9-%tu$ w N-%tu$%Ï1d-%t‘Þ{$L±‡-%Pu%Q‘Ôz%t‘àz&|"ó'%tuW»à"è"tÆ-Jef»ì ‘1ºÀl.efÀì àÀ½ vÀà RitÂù RrcÃlX%álð"n%ú-0Jefáì ‘5© á‘F'ã-0‘ 7rcäl4 9àå„ 9væ³ FÚ瘑@:Æ-#0î‡/.ï-â .ã-!/Ø-S;PGû-‘ŒT.L!Vt Ü$%Ñ /. „!CÜ$%<… $§#)/%Ps%t‘Œ$Û#>/%P‘Œ$% _/%Ps%Rv%Q‘Œ$-%t/%P‘Œ&i%%P‘Œ$:#"3/%t‘$]#;3Á/%t‘ %t‘%t?$ø#±ê/%Ps%Q‘ü~%t‘€%t1$$Ï10%t‘ $Ÿ$.0%Ps&Ä$ç1%t‘@%t ²=0 ±YE¥×Yû¦×Z; ×Ãp0[>\Y v…0[]^p •¢0[¥ [_” è·0[Ã^ Æ/Ù0[²[²[o\€ ƒü0[× [Ã[>[\ t1[]^j –31[¥ [ò [^ ›lU1[ì [€ [\Ñ ¡s1[ò [Å[>^ ¢z‹1[^+ ­l²1[Å[÷[>[>^» £zÏ1[c[z^ƒ ±>ç1[÷\· … 2[× [c[>[\p Ç-2[/[ã [ã [æ ^g ¤²O2[[s [÷\ˆ šc2[ì \N xx2[]^º/2[2/`L ÷2[Ã[c[±^Ø ¨²Ô2[¥ [÷^} ’l3[ì [([([ã [^Z l"3[ì [([Z1 >;3[a¡ ¯l[ã [[>[>% UR$ > : ; I$ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I& : ;  : ; !I/ : ; I8 < .: ; ' I : ; I: ; I.: ; ' .? : ;' : ;I: ;I.: ;' 4: ; I.? : ; '   4: ; I!.? : ; ' I ".: ; ' I@—B #4: ; I$‰‚1%Š‚ ‘B &‰‚1'.: ; ' I@–B (: ; I): ; I*: ; I +.: ; ' @—B ,‰‚1-.1@—B .1/1 01RUX Y 1.: ;' I 2.: ;' I@–B 3: ;I4: ;I5: ;I 64: ;I 74: ;I84: ;I94: ;I:1RUX Y; U<1=Š‚1‘B >: ; I ?4: ; I@4: ; I A : ;B1X Y C D1RUX Y E F4: ;I G41 H.1@ —B I.? : ;' I@—B J: ;I K.1@–B L1X YM.: ;' @—B N.? : ;' @—B O‰‚•B 1P.? : ;' @ —B Q‰‚•B 1R4: ;IS.: ;' I@—B T41U UV1X YW.? : ;' I@ —B X.? : ;' I@–B Y4: ; I? < Z.? : ;' I< [I\.? : ; ' < ]^.? : ; ' I< _.? : ;' < `.? ' I4 < a.? : ; ' I< t5t 58t8Ft $P$2S2CPCFSPStSÁt0ÁÂtPtPt®S®ÂóPŸPtRtÂóRŸÐÑtÑÖtÖt ttÐôPôSóPŸttt et eft fgtghtPgVghóPŸ=R=fSfhóRŸpststÀ t ?tÀp­P­V óPŸ 3V3>P>?óPŸ@CtC±tб¸t¸FtÐ@oPo®U®²óPŸ²FU@XRX²‘\²¼P¼‘\+P+F‘\@yQy¢S¢²óQŸ²FSºS+FSº‘\+F‘\ºU+FUPQtQRtRSt STtTYtY7tð78t89t9:t :;t;@t@ tð !t!"t"#t #$t$%tPtPt8S8<óPŸ<!S!%óPŸPmRm%‘¨PjQj%‘¼{ƒPPƒ0Ÿƒ£U£ÖuŸÖ0U<$U›‘LŸQ#‘LŸ#'P'0‘LŸ<à‘LŸàäPäî‘LŸ‘LŸP%‘LŸ<ˆ ‘u5$Ÿˆ¥Q¥î ‘u5$Ÿ<î‘°<<îS01t14t45t 56t6<t<Xt€X[t[\t\]t ]^t^`t` t€0sPs^U^_‘À}(Ÿ_ U0sRs ‘¬}0sQs ‘¸}0@ ûŸ@RS_  ûŸ #  ôŸ# t  ûŸt   ôŸâSy € S… Ž Sã‚SÔ ä SV _ S¥ ­ SÙ â S6VSV€p~ŸÓ Sä L S# / S[ d S( µ S ΠSù  Sâ÷S÷ÿs~Ÿÿ‘„}2ŸY b S0s0Ÿs5‘·}_‰‘·}‰šPš‘·}Ô… ‘·}… ™ P™ ? ‘·}[  ‘·}0s0ŸsÝ‘°}ÝâQâ‘°}°S°? ‘°}? I SI  ‘°}0s0Ÿs@‘Æ}_“‘Æ}ây ‘Æ}…  ‘Æ}0s0Ÿs ‘Ä} ¤P¤O‘Ä}ORPR5‘Ä}58P8 ‘Ä}È@W_L WV  Wø‚SÔ ä SV _ S¥ ­ SøP$‘¸}Ô ä Ptt/t°P/óPŸ ‘ t‘ ’ t’ “ t “ ” t” — t— µ tൠ¶ t¶ · t· ¸ t ¸ ¹ t¹ À tÀ Y tàY Z tZ [ t[ \ t \ ] t] ` t` l tàÙ á Pø P  P ] U] ^ P^ l U® º ‘Há l ‘H ® 0Ÿº á 0Ÿá S  P  S  v ) S) > RC ^ R^ l Sp s ts û t0û ü tÐ è VÐ è ‘Ð è Sttt t t LtÐLMtMNtNOt OPtPQtPMSMQóPŸRPUPQóRŸ*Q‘XRÙVÙávŸ`atabtbct cdtdjtjEt°EHt¬H³t°³´t´µtµ¶t ¶·t·¸t¸ät°´Q´¸‘”Ää‘”¥ªP“R“ª°‘˜“R“°¸‘˜Ä䑘ҭ‘€Ää‘€õ&P“R“ðótó:t :@t@Ot OXtX§t °±t±²t²µt µ¸t¸¾t¾tÀttt ttktÀ°ÅPÅW óPŸ kW°ÅRÅV óRŸ kVÁÜSÜâUâðS SÔâU ¡t¡¤t¤Át ÁÂtÂÃtÐÑtÑÔtÔñt ñòtòótttt t t AtðADtìD|tð|tìÊtðÊËtËÌtÌÍt ÍÎtÎÐtÐþtðþÿtÿtt ttAtðPËSËÏóPŸÏÿSÿóPŸASOROAóRŸOQOA‘¼z“Ï‘ØzÜA‘ØzKA‘èzV`P`¢‘¸z¢¬P¬°‘¸zÏA‘¸zǰ‘¼zA‘¼zËÏ‘ðzA‘ðz»Ï‘äzA‘äzÃ7V7°‘Þ{Ÿ‘Þ{Ÿ3V3A‘Þ{ŸÃÏQϰ‘ÄzA‘ÄzðSASçñPñFWFQ‘ÈzQ°‘Èz@Ÿ‘Èz&W&3P3AWÔ×P×°‘ÀzA‘ÀzãNUAU!N0Ÿ\°‘ž{Ÿ\°WްWް‘Äzpqtqrtrst stttytytÐttt tt§tÐp‘P‘§‘Tp‘R‘SóRŸ§S{U§U…ï‘P“V“]‘P“V“m§‘P“V“…U§UšSóRŸ§SÌï‘P“V“]‘P“V“z§‘P“V“ÌUmUz§UÌm‘Tz§‘TâïR%R%VPzRâïRvRv}r@ŸzRÌï žS žSs r ö7 ÷7÷0Ÿs~V“W“~Žp÷)?÷)÷÷)÷0õ0"ŸŽp÷)?÷)÷÷)÷0õ0"Ÿz§ ž2<P“R“<hV“W“hmP°³t³ìt0ìðtðpt0ÙÛPíôPôS P:@P@NSNVPVpSÛí‘l"p‘lpsts«t «°t°Àt ÀÈtÈÏt Ðã‘ãíPíî‘Ðã‘ãîRðñtñòtòót óôtôútú@t€@CtCDtDEt EFtFHtHÓt€ÓÖtÖ×tרt ØÙtÙàtà{t€{~tü~¹t€¹¼tü¼Ò"t€Žp"‘Èzp"{"R{"Ò"‘Èz­Ú‘ÐzCp"‘Ðzƒ"Ò"‘Ðz/Ò"‘àz8OPOzSz€P€—S¡­SÚéSýPPSP^P^© S© §!‘¸zQ"p"‘¸z~"ƒ"P­Ú‘èz‚p"‘èzƒ"Ò"‘èz­Ú‘Øznp"‘Øzƒ"Ò"‘Øzvš‘Þ{Ÿš¥P¥_‘Þ{Ÿ_zRz©‘Þ{Ÿ©¸Q¸ ‘Þ{Ÿ © V© ²!‘Þ{Ÿ²!Æ!VÆ!p"‘Þ{Ÿƒ"™"‘Þ{Ÿ™""V"Ò"‘Þ{Ÿv¥‘Èz¥p"‘¬zƒ"Ò"‘¬zv¥Q¥p"‘°zƒ"Ò"‘°zvp"Uƒ"Ò"U­Ú‘Üz‰p"‘Üzƒ"Ò"‘Üz­Ú‘ðz¡p"‘ðzƒ"Ò"‘ðz¨«P«ÓQÇ© W{ © 0Ÿõ!Q"‘¬zƒ""R"™"‘¬z."3"P3"Q"‘¬z."Q"Rð"ö"tö"Ž#tÀŽ##t#n%tÀc#e#P#“#P“#Û#‘ì~þ#$P$5%‘ì~P%n%‘ì~e##‘ü~$É$‘ü~`%n%‘ü~e##‘€$É$‘€\%n%‘€#â#‘€Ÿâ#ë#Pë#÷#t÷#n%‘€Ÿ#é#‘ü~Ÿé#÷#Q÷#n%‘ü~Ÿ­#³#P³#:%‘ì~:%P%PP%n%‘ì~Ü$%‘ŒŸ%%Q%(%‘ŒŸ(%,%P,%:%‘ŒŸP%d%‘ŒŸd%h%Ph%n%‘ŒŸ$n%/º 0F› £È› £È@X\ƒˆÒóöøØ ä ´¿ËFN°A´¿ËV[nslwFN°A);\Ž;FN:šµ¸Ìpzµ¸Ìòpz§µ¸Ìòpz§zp"ˆ"Ò"zp"ˆ"Ò"ƒ “ ¤ õ!" "."ˆ"™" “ ¤ ™!X"p"" "."X"#Û#Ð$@%P%n%#Û#Ð$Ù$Ü$@%P%n%n%/Ÿ)û libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/include/usr/include/i386-linux-gnu/sysnode.cstddef.htypes.hlibio.hstdio.htypes.htime.hstdint.hbyteorder.hexfatfs.hexfat.hstdlib.hstring.hÿ=sƒY-/3®í»Bº=s K:¹ƒ gg×u­u(È‘uË?ƒ¸Ö?9?hM;=WWv,u==-=38/z<»xtÈv:L:N8hdJ2VhÌ /t0Y/3>uf÷»§<–z.PzJP×-KÌÔò¦y<Xñ{<Œ%MŸ  (h‘‡Qò t`J '-a<Ç", \¬ƒ/Ö’å{fºÍt³~<‚dssÄXÅ~®kXXYµ¿X¦y<*'X¶Ö¦¦~‚àtƒ ¹~Ö?³M+M¤É‘-/l/;=‘utJ X‘Œ¬¿¢4Ü:Z5=WKhô„XüXØ@³¿¡Jß<¡.»==ÝžzzJˆ.fÏg0 ‚YºÙéf”í~J“XZä¿>:h È:?­-=n-kfLÐ~J°X“¼~ º­‰ƒ-?dmv0õ~XÞ¥JÛX"`veg™JæXÃÖ×~t©X­÷~X_X!XZ±XœJtðX­OX@XÀXZ‡X·~JÉX!æ~X1xžUJ+X!'­<ÓX#qX¹JÇX!óXhV“NXô~tŒX­sX„, LV[Ú}fMLê‚tQ#¬` /-Kæ>K-/0=x< Ju<tv[ =;KU‡²Ô#òŸY:LW­)u1t­BzJKŸeK¡UxF2Œ@+ØY0æØY0^¿fžÝÙ¡=eKƒ=IK‘’2Z‘+#*ZhVg;xcw.g[.HZ:Z!*u]¬ºyò²|¬äK'0 zwþLªŒ­„yºå‡‚Ú ‘=~l{vuux u=Iõ¹CKѺƒ/=r==jKsKYs>#KsKYs>Ê~ Âx"[ƒöY-KhÂÇKs‘eÊ,L£³Ö‘wU@-/hL;KH=ŸZ7W>qYKY(\üÉåæ-YãuGƒ„©…ð®ÊHZ8å<‚p ¬p‚/ƒhHGª„z8 fž{¬ÙÉ==/›tK;/L=>Át‚ôqò»ó ‚S<h.§È>ºÏ~ä‘/:L³{<ÍJNY±‚=;ƒiK<gH„vƒI= 5å9‚5<Kts. JsA0€Jª„Éz@ ÖÂ}NåËK>PzJuy/vu>£f-t }t»ÔGu$my.#ó2-KXH(g-K±’#»-KjsƒYå,uK/„QK2¦y<®*˜L‘.dòKL*yufat_count_shortbufexfat_super_block_IO_lock_tstrlenexfat_node_IO_buf_endsector_bitsflagssector_startfptr_indexbufferle32_to_cpucluster_sector_start_IO_write_endunsigned intnextversionuint32_troot_flagsco2odmaskopendir_markersfptr_clustererrorro_fallbackprevexfat_get_labelchunk_sizecreateexfat_entry_upcasecontinuationsasizeoem_nameexfat_c2oiteratorutf16_lengthchunkcontiguousutf8_to_utf16exfat_mknodwrite_entryexfat_flush_nodeexfat_calc_name_hash_posold_pathstdoutexfat_truncateGNU C 4.7.1exfat_start_checksumchecksummallocupcaseexfat_cache_directorylong long unsigned intoffsetexfat_put_nodeexfat_rmdirgrow_directorynew_clusterle32_tfind_label_IO_backup_basemeta2_offset_offsetexfat_reset_cachechildtimesubentriesallocate_node_filenonew_offsetexfat_entrytv_nsecsize_tupcase_charsexfat__u16_IO_read_base_IO_save_end_nextexfat_mkdirfreereference_checksummajorpathexfat_pwriteexfat_unlinkexfat_get_nameclusterjumpcmapbitmaptimespeccharfmaskshrink_directoryexisting_modename_entryfat_sector_startsector_countspc_bits_IO_markerclosedir_IO_read_ptrexfat_preaddatadeleted_offsetuint8_t__u32time_tmdateexfat_add_checksumle64_to_cpuentrynew_path_IO_write_baselong long intexfat_entry_bitmap_IO_save_baselabel_utf16entry_offsetexfat_entry_meta1exfat_entry_meta2crtimereset_cachenamepboot_signature__quad_tsizenoatimerootdir_clusterminorexfat_update_mtimeinit_node_meta1__pad1__pad2__pad3__pad4__pad5crdateexfat_get_nodeexfat_exfat2unixexfat_set_labellast_node_vtable_offsetexfat_warnexfat_errordirty__gid_tuint16_ttree_attachgid_tget_entry_ptractual_checksum__u64uid_tmeta2_IO_read_endmtimeparentshort intcrtime_cstree_detachlong intlengtherase_entry__unknownle16_tcpu_to_le16nodeuint64_treaddirold_offsetfile_nameexfat_entry_labelold_cluster__uid_texfat_update_atimenamestart_clusterinit_node_meta2new_size_locktv_sec/home/thomas/source/exfat-utils-0.9.7sizetypele16_to_cpufat_sector_countlong unsigned intzero_cluster_old_offsetstdin_IO_FILEcpu_to_le32find_slotexfat_next_clusterexfat_splitallocated_percentmtime_csname_hashvolume_serial__unused1__unused2cluster_counttypeexfat_utimesunsigned charmeta1_sbuf__unknown1__unknown2__unknown3utf16_to_utf8current_IO_write_ptrreferencesexfat_lookupexfat_calc_checksumrename_entryexfat_flush_cmap__time_tle64_tlabelexfat_renamename_lengthcluster_tdifferencename_entriesmeta1_offset__off_tsigned charoff_tshort unsigned intlibexfat/node.cexfat_deventry_clustermemcpyentriesreal_sizenext_entryexfat_unix2exfatexfat_bugdeletefetch_next_entry_chainattribexfat_entry_name_flags2atime_cur_columnadate__off64_t_unused2_IO_buf_baseentry_typedrive_novolume_statecpu_to_le64GCC: (Debian 4.7.1-2) 4.7.1zR| ˆ FC Oƒ‡c ÇÃC @PrC0KƒF†H‡UÇÆÃdÐ8AƒE pAÃ(„XA†C ƒE L AÃAÆ(°pÏC@GƒP†‡…• ÅÇÆÃA (Ü@CPD†G‡NƒL…I ÅÇÆÃG PPÕA…A ‡A†AƒEpÞ AÃAÆ AÇAÅE àAÃAÆ AÇAÅ@\0OA…C ‡A†AƒF€ CÃAÆ AÇAÅB  /AƒF°¼€ TÐ ÜA…A ‡A†AƒC`^ AÃAÆ AÇAÅG ™ AÃAÆ AÇAÅC $(p ŒC0HƒL…†P‡dÅÇÆÃ<PQA…C ‡A†AƒEPAAÃAÆ AÇAÅH`„A…A ‡A†AƒF°Û¬C°k AÃAÆ AÇAÅA (Üð·C DƒH†{ ÆÃF O ÆÃI <°»A…A ‡C†CƒFÀF AÃAÆ AÇAÅH Hp \€p #AƒC ]AÃÐ#AƒC ]AÃh°AA…A ‡A†AƒHð5ìCðxìCðK AÃAÆ AÇAÅB n AÃAÆ AÇAÅF P<0p7A…A ‡A†AƒEP• AÃAÆ AÇAÅF $p°ÀC0I†H‡Hƒ` ÇÆÃD (˜p_C DƒH†l ÆÃE P ÆÃH ÄÐhØðâA…A ‡A†AƒF€F CÃAÆ AÇAÅB ‹ CÃAÆ AÇAÅG ›üC€{üC€Dà"(Xð"~FÀIƒ\†‡…s ÅÇÆÃB .symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.1.rodata.str1.4.rel.text.unlikely.rel.debug_info.debug_abbrev.rel.debug_loc.rel.debug_aranges.rel.debug_ranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@n% @­ %°%+°%02°%?2Ä&óR·)/N `²eæ)_3a x² qE]ºƒÿbó! xÌP& ’ò„(Ž Èò¥…¡ àòà·ª‡£³ ÀöÃ0M/ Î0|š×™šëœš€ç Ðöè õt¥À 4ª ñÿFPrÐ8$X4pÏC@TPÕ^0Of/|Qˆ°»”A›p7   ¢©µ¾ÈÍÞêô *?M`o€ ~ Ü”p ŒŸ¬¹`„ÊÛïð·þp ,€9 #LQÐ#dpwŒP˜°À¤±p_½ÐÊðâ×à"çð"~÷þnode.callocate_nodeco2oclosedirinit_node_meta1opendir.isra.1fetch_next_entryfind_slotreaddirexfat_put_node.part.4erase_entryreset_cachecreatedeletemallocexfat_error__moddi3exfat_c2ofreeexfat_exfat2unixexfat_preadexfat_bugexfat_next_cluster__udivdi3exfat_truncate__umoddi3exfat_start_checksumutf16_to_utf8exfat_add_checksumexfat_get_nameexfat_get_nodeexfat_cache_directorynext_entryutf16_lengthexfat_pwriteexfat_flush_nodeexfat_unix2exfatexfat_calc_checksumexfat_put_nodeexfat_flush_cmapexfat_warnexfat_reset_cacheexfat_utimesexfat_update_atimetimeexfat_update_mtimeexfat_splitmemcpyexfat_calc_name_hashexfat_mknodexfat_mkdirexfat_lookupexfat_rmdirexfat_unlinkexfat_renameexfat_get_labelexfat_set_labelstrlenutf8_to_utf16;@ q"¦!ø#:$[$ÇÚ"%#( 6;&Ì'ä"%3 8 Ä!¢(Î)¡ª î!D#—+,C-³ Å !-«*    f } "ž %À  Å  û " "C %b  g  Š .¦  ³  Å  Ï  ë  ô     %  A  J  e j  ‘ –  Å  Ê  å  ê      &  0  k  p  ; #È !â '+2y3˜1Õ31@3×1#%m55º%A6x3¢3» À&ËÐ&Ûà&p)x#4£Ø#$.2 ;9X7°=à=L?q2Ì2@t=—5=Ax6Á3á13þ163¬>¼7Ø7è7–>þ7z2(b)’—&ž £&D2)H7g7‘00Dr?©7¹7É7÷E 7!2¢2ö%1Q%wAµ6 3> 1w 3U!1•!3x"F6#JY#K$2À$3%!P8.& +& %,3:?LSZahtŠ•¢§´¹ÎÓàïþ +:IXgv…”£²ÁÐßîý *9HWfu„”›§µÃ%0;GUp{†‘¤³ÆÕè÷#2?M[iw…“¡¯½ËÙçõ-;Iš¦´Óßíû (4BP^lz™¥³Áàìú$2@N\jx†”¢ÁÍÛé÷!/=Kjv„’¡®¼ÊØæô   , : H V d r   ® ¼ Ê Ø í  " 0 > L Z i x ³  Ò ú   " 0 ? Z u ¼   5 P ] h € ™ ¥ ± Ê Ø å ÿ  0 T y  œ » Ì Ø ã ç ë õ ÿ (/:>BUZdiw‘˜œ ³¸ÂÉÍÑÛåêôù"&*8]f‚—©¯½ÈÌÐÞçðùý<QZh p™¥²¾ÂÆÚêïúÿ5:FQZ^nsƒ‡— ©²·Ò÷-AR]aex}‡Œ–±¶ÃÍÒÜáëðúÿ ',6;EJTY`im|…•™¨±·»ÄÔø ':\ezƒ—¹Üî 3E KTpy‹ ‘š¯¸Ê Ðâ èú %7=O btzŒ’¤ ª¼ ÂÔ Úì ò" _cguƒ‘¶Ä ×ÛòþEJUZej޵É×Ûß &/48B^fjn‚‡’—¦±¶ÁÆÕëÿ=Ql£¼ÄÈÌäóþ#.3CRf‹Ÿ»á!Mi…— ¯µÃÎÒÖðú+GX`dh|Œ‘œ¡¬±µ¾Îò (=W_c~’šž«ÕÝáåïþ *9Js‹—£¯»ÇÓê    0 5 @ E P ` e u …  • ¯ ¸ ¼ Ì Õ Þ ç ð ù þ !"!+!4!=!A!Q!Z!`!r! !´!Ñ!Õ!å!î!ô! "";"O"u"š"Á"Õ"ó"!#5#J#f#{#¯#Ä#ç#ü#$$$0$4$O$^$~$§$³$¿$Ë$×$ï$û$ÿ$%%%'%,%7%<%G%]%a%q%{%%%™%%­%¶%¿%Ä%Í%Ö%ß%è%ñ%ö%ÿ%&.&4&B& J&e&z&•&¡&¥&©&Á&Ú&ß&ê&ï&'2'G'\'p'ƒ''“'—'¯'¾'Ú'õ'(((!(,(1(K(p(|(ˆ(”( (¬(¸(Ä(Ð(Ü(ó()))).)=)L)W)\)w)|)Œ)—)œ)¶)¿)Ã)Ó)Ü)å)î)÷)** *)*2*;*D*M*Q*a*g*y*§*»*Ú*Þ*î*÷*ý*+'+D+i+}+™+¾+ã+ÿ+,0,^,r,Œ,±,æ,û,-%-:-O-e-ˆ-›-§-«-Ç-ä-ð-. .$.(.@.O.i.n.y.~.‰.Ž.¡.¥.µ.¾.Ê.Ü.å.é.ù.þ.//*/?/`/u/ˆ/ž/Â/ë/00>0K0Y0r0‡0¤0¹0Û0þ0151W1u11´1Ñ1é1 2/2Q2e2z2˜2¹2Ö23$3=3 $(8<CGNRY]lpx|„ˆ˜œ£§®²ÄÈÏÓåéñõý  )-48?CUYaemqy}…‰‘•¡±µ¼ÀÇËÝáèìó÷  "&.2CGNRY]gkrv}“—Ÿ£¬°¸¼ÍÑØÜãçñõ&*26=AQU\`gkuyˆŒ“—¦ª²¶ÆÊÑÕäèðôü  $-19=EIQU]aimvz‚†Ž’šž¦ªº¾ÅÉÐÔÞâéíÿ #*.?CRV^bimvz…”˜¡¥¬°¹½ÄÈÑÕÞâéíöú#'6:AE\`qu†Š™¥©±µ½ÁÉÍÕÙâæîòúþ "37>BIM[_nry}Ž’™®²»¿ÆÊÓ×àäíñ +/6:AELPW[jnuyŠŽ•™ ¤«¯¾ÂÉÍÔØçëòöÿ   # ' / 3 < @ I M T X a e n r y } † Š › Ÿ § « ´ ¸ ¿ à Ì Ð × Û ä è ï ó      ! * . 7 ; L P X \ e i p t }  ˆ Œ • ™   ¤ µ ¹ À Ä Ë Ï Þ â é í ô ø ÿ     ! + / > B J N V Z k o v z Œ  ˜ œ ¤ ¨ ° ´ ¼ À È Ì Õ Ù á å í ñ ù ý      " * . 6 : B F N R Z ^ o s z ~ … ‰  ” › Ÿ ¦ ª ¹ ½ Å É Ù Ý å é ñ õ ü       " ) - 4 8 ? C R V ^ b j n ~ ‚ ‘ • ¥ © ¸ ¼ Ä È Ð Ô Ü à è ì ô ø  %)15EIPT[_qu|€‡‹¡±µ¼ÀÑÕÝáéíõù '+48@DLPX\dhpt…‰”¡²¶ÂÆÔØáåöú04<@HLTX`dlp€„Œ˜œ¤¨°´¼ÀÉÍÕÙáåíñùý %)04>BQU\`gkuyˆŒ“—ž¢©­¼ÀÏÓÛßçëó÷ÿ#+/7;CGW[cgos{‡‹“— ¤­±º¾ÇËÔØàäìðøü!)-59AEMQY]nry}„ˆ’–¡«¯¾ÂÉÍßãêîÿ !%6:AENRY]fj{ˆŒ¡ª®¿ÃÌÐáåìðúþ )-48AEVZaetxƒŠŽ—›©­¶ºÁÅÌÐßãêî÷û *.>BTXgkz~“›Ÿ§«³·¿ÃËÏØÜäèðôü )-48HLSW^blpƒŠŽ¡®²¿ÃØÜãçöú"&37DH]ahlsw†Š’–¦ª±µ¼ÀÇËÚÞåéðôý$(8<OS_c|€™µ¹ÅÉÝáðôü (,37>BIMTX_cjnuyˆŒ”˜¨¬´¸ÀÄÌÐØÜäèøü#'/3BFNRZ^fjrv~‚‹—›£§¯³»¿ÇËÔØàäìðøü!*.7;DHY]fjqu†Š“— ¤µ¹ÊÎÕÙàäëïöú "&-18<EIRVeirvƒ”˜¡¥®²ÃÇÑÕÜàêîõù '+59@DNR\`gk}ŠŽ—›¬°·»ÄÈÙÝäè÷û&*37@DUY`dsw†Ššž§«²¶ÇËÒÖçëúþ     # 4 8 ? C J N W [ b f o s „ ˆ ‘ • ž ¢ ³ · À Ä Í Ñ â æ ð ô û ÿ ! !!!!+!/!6!:!L!P!W![!d!h!o!s!„!ˆ!’!–!!¡!«!¯!¶!º!Ä!È!Ò!Ö!Ý!á!  $048<HLPTX\hlptx|ˆŒ”˜œ ¤°´¸¼ÀÄÈÌÐÔØÜàäðôøü (,048<HLPTX\`dptx|€„ˆŒ˜œ ¤°´¸¼ÈÌÐÔØÜàäèìøü  $048<@DPTX\`dhlx|€„6” Dhˆ´à `¤ÀÔ,T”à L`t”´ 4tœÈÜH\time.o/ 1341843650 1000 1000 100644 10160 ` ELF4(ƒì<‰t$0·t$@‰|$4¶D$H‰\$,·|$D‰l$8‰ò‰ñfÁêƒáfÁî fƒâ„íf…É„äfƒú ‡Ú‰ûƒãf‰\$‰ûfÁëƒã?fÁï fƒû;f‰|$‡ôfƒÿ‡êfƒ|$‡Þ<LJ·î·ú‰l$Å»Áý,½i|$€3áií€Qf÷Ƭ/aC‰l$ufƒúv Å€Q‰l$·T$·Û·ÉkÛ<ƒé‹|$iÉ€QiÒÚʹ)öá×·T$fÁèÀèW¶ÀÐë+f·ö·É·ÒƼ‰L$ ‰T$‰t$Ç$èüÿÿÿ1À‹\$,‹t$0‹|$4‹l$8ƒÄ<Ãv·D$·Û‰\$Ç$À‰D$ ·D$‰D$èüÿÿÿ1Àë¾t&‰D$Ç$0èüÿÿÿ1Àë¥t&UWVSƒì¡‹L$¦Î9ȉÂ}‰Ê)‰$‹$ºE.‹ $÷ê‹$Ѻs°mÁøÁù)Á‰Ø÷êÁûÁú)ڷƒâ‰D$»i\$“þÿÿÁø)Á…Ò¸¬ît!1ö1Ûƒø t2H‰ï4)ß9÷|=…Ò‰Èu߃øt"¾»Ò‰Ö1Ûƒø uκ€ë¶¾1Ûëå´&‰ÂÁâ‹L$¿Å³¢‘¾‰ˆˆˆ…‹D$ Áá )Ý‹$ ʃÅ‹ $ êf‰‹$Áù÷ï$Áú )ÊiÒ)Ó‰Ø÷î‹$,ºE.Â÷ê$ÁûÁýÁú)Ý‹$)ÊiÒ€QÁå)Ó‰Ø÷ï‹$<÷î‹$$Áÿ Áû)ßÁç Áú ï)ÊkÒ<)ЉÂÁêÐÑø Ç‹D$$f‰8‹D$(…Àt‹$Áéºdȃà)ȯ‹T$(ˆƒÄ[^_]ô&ƒì,èüÿÿÿÇ$èüÿÿÿ‰D$D$‰$èüÿÿÿ‰$èüÿÿÿ+D$£ƒÄ,Ãbad date %u-%02hu-%02hubad time %hu:%02hu:%02ubad centiseconds count %hhu;Zx—µÔó0N§ Kש§¾¤7Õ,kÆ“-int8h%…'öŽo>n•…±[”yka# «# «#Q«#  «#]«#å«#|«#-«# w«#$-«#(  «#,—"·#0$½#4Œ&a#8C*a#<,z#@603#D_1S#FÖ2Ã#G!6Ó#HL?Œ#LïH©#TwI©#XyJ©#\„K©#`‹L:#dKNa#h‰PÙ#l ²´ Ë º· ’»·# X¼½# SÀa#€¸ ±Ó —y ±é —'ï±­Lžtm,…¥ …‡a# ˜ˆa# ωa# àŠa# ý‹a# ŸŒa# ca# iŽa# ½a# r’…#$ “é#(À1E`23PÒ ·P°#óP»¥ÒU°vUÒ‡YÒ(vY°tYÒB6ô¬|Ÿ6Ò‘6Ò:96¥‘½8ôdq9° :°day<°i~=°ª’>°9è@°vminA°¾^B°4O/ ttvt ‘”5%? ÿÿ/[tt‘V” ÿÿtst ‘T” ÿÿ1$¨/t0t‘”ÿ”j°hy½jôŸjã‘jã‘9kÝ‘ 0mô|dayn°¦~n°Ì’n°ëèo°þmino°4^o°nGpa®iqaèBaûT€aú•p©8Þnow—ôdxD„O¿t0”mÔt‘lœ– … ôÿ — Ø0ï!=¥½!«¦½"´ vD#é$%¥&ºôg#gô&Èé……#‹ÿ‘ô'€Áô#…% $ > : ; I$ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I : ;  : ; .: ; ' I : ; I4: ; I.? : ; ' I@—B : ; I : ; I4: ; I4: ; I4: ; I‰‚1Š‚ ‘B ‰‚1.? : ; ' @—B  U‰‚1 4: ; I !4: ; I? < ".? : ; ' < #I$%.? : ;' < &.? : ; ' I< '.? : ; ' I< tdtÀdhth¬tÀe‘n˜W&¬W’ ¦ÎŸ’Êv ÿÿ €3áv ÿÿ#»2&"#€Â‚ŸÊØUØÜ‘XÜí,‘V” ÿÿ q÷3÷%ô%ÿÿÿÿÿÿÿÿ"÷, €Q‘X""Ÿí÷,‘V” ÿÿ q÷3÷%ô%ÿÿÿÿÿÿÿÿ"÷, €Q‘X""Ÿ WR&P&Q ¦ÎŸe¬ ¦ÎŸ-íQí÷qŸ&NQeŽQ“§Q-5r?Ÿ5áRá& ‘”5%?Ÿ&NRNe ‘”5%?ŸeŽRŽ“ ‘”5%?Ÿ“§R§¬ ‘”5%?Ÿ17V7QvÄpŸQe‘”9%Ÿe¬V1ewOŸe&‘”OŸ&QwOŸQ¬‘”OŸ1^w5%?Ÿ^as?Ÿaew5%?Ÿe& ‘”5%?Ÿ&Qw5%?ŸQ¬ ‘”5%?Ÿ1ew;%Ÿe˜W˜&‘V&Qw;%ŸQe‘”;%Ÿe¬W°±t±²t²³t ³´t´·t·ctcdtdeteft fgtght°Í‘ÍÏRÒÚRÚßPßäQäìPìctch‘dÅÕPÕh #€Ìº–Ÿ¢usp2$"#Ÿ.0Ÿ¦P Rc t<2Ÿch ‘d<2Ÿct <Ÿch‘d <Ÿct €Q Ÿch‘d €Q Ÿñ Q.U¢usp2$"Ÿ.¦PVf0Ÿ4QSfrS¢Spsts¨t0¨©t„ŒPŒ©‘l© ".›¢©«­Ùû libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/includetime.cstddef.htypes.hlibio.htime.hstdint.hbyteorder.hstdio.hexfat.h6"-/I>P.šŸ‘RxJ`òÀ‰=;­hV®.g¡Y9?9?Ghd02q0Ys=[h_J' .df'”ó‚uWK ÈZ!Wƒ/°,VxK0X,0.YºLYòGyž tvt5?z.??U«=;Ÿe=-±7h:>€‡9?+õ‘ƒŸõ?Yó»__quad_tntimetm_zone_IO_FILE_IO_save_endshort intsize_tsizetypedays_offsetleap_sub_IO_write_ptr_flagstm_gmtoff_IO_buf_base_unused2year_markers_IO_read_endtime_texfat_erroruint8_tgmtimetm_hour/home/thomas/source/exfat-utils-0.9.7tm_monlong long intexfat_timezone_locklong intshift_cur_columnexfat_exfat2unix_pos_sbufhourtm_wdayunsigned char__pad3mktimecpu_to_le16signed chartm_yearlong long unsigned intunsigned int_IO_marker_shortbuftm_mdaytwosec__pad1__off64_t_old_offset_IO_write_basetime_IO_read_ptr_IO_buf_endcentisecleap_daylibexfat/time.ccharuint16_ttm_ydayndate__pad2month__pad4__pad5_nexttm_mindateshort unsigned int__u16tm_isdstlong unsigned intdays_in_year_IO_write_endle16_texfat_tzset_chainGNU C 4.7.1le16_to_cpu__off_t_IO_backup_basestdin_flags2_mode_IO_read_base_vtable_offset__time_t_IO_save_basetm_sec_filenoexfat_unix2exfattzsetstdout_IO_lock_tunix_timeGCC: (Debian 4.7.1-2) 4.7.1zR| ˆ(¬C@D†R‡ƒI…B ÅÇÆÃD <H°¸A…A ‡A†AƒC¬AÃAÆ AÇAňp9C0u.symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.1.rodata.rel.debug_info.debug_abbrev.rel.debug_loc.rel.debug_aranges.debug_ranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@© "€%ì+ì02ìL?@4 Kt«G  "ÈW i<ƒe h' x¿ t €' ‡ß(™±• '¥0¸Ç°0¹œÍœœÉ ˜'8×ø° ¨!wñÿ4   $¬5A°¸Rp9^diptime.cdays_in_yearexfat_timezoneexfat_exfat2unixexfat_errorexfat_unix2exfatexfat_tzsettzsettimegmtimemktime¨ FKw‹Ÿ¤¸Ažt€˜¡ !(/6;HOV]kp{ˆšŸ´¹ÆÕäó />M\kz‰˜§¶ÅÔãò.=L[jz›©õ '5CQ_m{‰—¦±ÄÓê*59= GU_ dr| Œ¡ ¦° µ¿ ÄÎ Ý âì ñ!3\j~…‰ —¡ ¦´ÂÐÚ é îø ý  % *4 9C P U Zd is {‚†Š ž £¬ÀÕßë #1FQo˜’ºØ æ LŒutf.o/ 1341843650 1000 1000 100644 10132 ` ELF˜4(UWVSƒì‹l$4‹|$<‹T$0‰è‰Ã)ëÑû9ûƒ•·f…É„‰‰ÎfæüfþØ„‡ƒÀ…À„<‹\$0)Ó\$8ƒù%…Ûtˆ ƒÂu¯Ç$èüÿÿÿƒÄ¸Üÿÿÿ[^_]Ãùÿ|ƒûvՉ˃á?ÁûƒÉ€ƒËÀˆ‰Ã)ëÑûˆJƒÂ9û‚nÿÿÿvƃÄ1À[^_]Ãv‰þ)Þƒþ†³·X‰ÞfæüfþÜ…áÿãÿÁá ƒÀ Ùé@ÿÿÿt&ùÿÿ~@ƒû†Mÿÿÿ‰ËÁûƒËðˆ‰ËÁû ƒã?ƒË€ˆZ‰Ëƒá?ÁûƒÉ€ƒã?ƒË€ˆZˆJƒÂéÅþÿÿƒû† ÿÿÿ‰ËÁû ƒËàˆ‰Ëƒá?ÁûƒÉ€ƒã?ƒË€ˆZˆJƒÂé“þÿÿ¶Ç$èüÿÿÿƒÄ¸¬ÿÿÿ[^_]Ãë UWVSƒì,‹|$D‹\$@‰ø‰\$‰Â)ú;T$LƒM¶„Ò„B‰þ¾Ê)Æt$L„Òˆï…ö…w‰Íåøýð„“‰Íåüýø„·áþùü…ƒþ†ü¶HƒâÁâƒá?Áá ʶHƒá? ʶHƒá?Áá ʶHƒá?Áá ʶHƒÀƒá?Áá Ê…À„²‹L$+L$@‹\$HÑù)Ëúÿÿ–…Ût‹L$f‰ƒÁ‰L$‹T$…Ò…ÿÿÿÇ$èüÿÿÿƒÄ,¸Üÿÿÿ[^_]ô&‰ÍåàýÀ„Œ‰Íåðýà…ñþÿÿƒþ†èþÿÿ¶PÁá ¶XáÿÿƒÀƒâ?Áâƒã? Ú ÊéGÿÿÿƒûvƒ‹\$‰ÑâÿÁù €ÎÜáÿ€ÍØf‰ f‰SƒÃ‰\$éIÿÿÿt&‰ÊƒÀéÿÿÿ¶ƒþ†kÿÿÿ¶HƒâƒÀÁâƒá? ÊéÞþÿÿƒþ†dþÿÿ¶HƒâÁâƒá?Áá ʶHƒá? ʶHƒÀƒá?Áá Êé¦þÿÿƒþ†@þÿÿ¶HƒâÁâƒá?Áá ʶHƒá? ʶHƒá?Áá ʶHƒÀƒá?Áá Êébþÿÿt&‹\$1ÀfǃÄ,[^_]Ãt&Ç$)èüÿÿÿƒÄ,¸¬ÿÿÿ[^_]Ãë ‹T$1Àfƒ:tt&ƒÀfƒ#Dã1L#F«2¸#G6È#Ho?Œ#LHž#TIž#XJž#\#Kž#`*L%#dÏNZ#hÐPÎ#l ´   º¬ »¬# :¼²# 5ÀZ#u­ ¦È —n ¦Þ —'ä¦òEZÿ2>P DPõ#xPUõCvUdYgvYõtY@²"™ò²"wc²éIJ%SËË`SËwcSÖÚT%ÑéÌ ò wcéÄ%%eZ¡òe ‘`eË‘Äe%‘Úf%‘ inphËái ]wcjé·™/n»¿µ ª4ÜVtê_øílrªt”ªtJÞI`ÞwcÖÚ€%ùÂZ°QVòÂ"‘`ÂÞ‘ÄÂ%‘ÚÃ%‘ inpÅÞ;áÆ"éwcÇéà@Ëú=j3“(»g–hÑ)Sƒ²xÛ̪AtDªt)Ü%`~t strÜËûiÞ%!Á¥²!¦²"¯v#Þ$% : ; I$ > $ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I: ;I : ; .: ; ' I : ; I4: ; I: ; I.? : ; ' I@—B : ; I 4: ; I4: ; I1RUX Y 11‰‚1Š‚ ‘B ‰‚1.? : ; ' I@ —B  : ; I!4: ; I? < ".? : ; ' < #I$ttt ttut0u{t{|t|}t }~t~€t€¾t0¾ÁtÁÂtÂÃt ÃÄtÄÈtÈ—t0—tžtžŸt Ÿ t ¡t UDP­ÀPÅýPýp|Ÿ ‘_RKRKPr|ŸP}R}‚r}Ÿ‚“RAqQ–Q–™Sú6Q69SPhQhkS/µò‚Å¡ò‚/DPÅýPýp|ŸV{S“S“­ ‘r‘"Ÿ­µ ‘r‘"#ŸSK ‘r‘"ŸKP ‘r‘"#ŸP[S[} ‘r‘"Ÿ}‚ ‘r‘"#ŸVqQ–Q–™S6Q69SPhQhkSV_R_drŸdqR¡R¡­rŸ­µR#R#1rŸ1ErŸEKrŸKcRcwrŸw}rŸ}‚R°±t±²t²³t ³´t´·t·ÏtÀÏÕtÕÖtÖ×t רtØàtà.tÀ./t/0t01t 12t28t8GtÀGMtMNtNOt OPtPQt»ÅWÅvPv~pzŸÙ%P%7p}ŸkuPuzpŸz“P“ p~Ÿ ËPËØp|ŸØPp{Ÿ&P»Å‘Å´‘\ÙQ‘\~´R2IRILQrzR› RÓØRRéÖVÙV3NVéò½3Qò½évPv~pzŸÙ%P%7p}ŸkuPuzpŸz“P“ p~Ÿ ËPËØp|ŸØPp{Ÿ–´S´Ù‘‘\‘1&Ÿ7ASAC‘qŸCk‘‘\‘1&Ÿ–´R7IRILQ–Ù‘\7k‘\`|‘|~R`l0Ÿs|P|~0Ÿ~/DÌVa€¡§­ˆàãé~à8p$–´8pøÎû libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/includeutf.cstddef.htypes.hlibio.hstdint.hbyteorder.hstdio.hexfat.hæt„I2j  <‡¦žZL×.ZÀ7]£f¼Z/;=;ÈX¹fÇf¬>;/q‚jJØge>;L¬ ‚’Ÿ×/;=;‘s¬’Ÿ/;=;‘Ä ºu< XÇHi:g:/+‚Zge=;»KE/Ø“I>:=; t“Ige1r/L:Ì“Ige2q/»L:8J-ZtÈ ºu< X?M»;“utf16_to_wchar__quad_tutf16_lengthutf16_to_utf8_IO_save_endwchar_to_utf16short intsize_tinputsizetype_offset_IO_write_ptr_flags_IO_buf_base_markers_IO_read_endexfat_error_IO_FILEoutsizewchar_to_utf8insizeoutp/home/thomas/source/exfat-utils-0.9.7long long int_locklong int_cur_column_pos_sbuf_old_offset__off64_tunsigned charcpu_to_le16signed charlong long unsigned intunsigned int_IO_marker_shortbufGNU C 4.7.1_IO_write_base_unused2_IO_read_ptr_IO_buf_endwchar_tcharuint16_t_next__pad1__pad2__pad3__pad4__pad5short unsigned int__u16utf8_to_wcharlong unsigned int_IO_write_endle16_tlibexfat/utf.c_fileno_chainle16_to_cpu__off_t_IO_backup_basestdin_flags2_mode_IO_read_base_vtable_offsetoutpututf8_to_utf16_IO_save_basestdout_IO_lock_tGCC: (Debian 4.7.1-2) 4.7.1zR| ˆh¡A…A ‡A†AƒC0n FÃAÆ AÇAÅB ~ CÃAÆ AÇAÅD ÏFÃAÆ AÇAÅhˆ°¡A…A ‡A†AƒC@ FÃAÆ AÇAÅH N AÃAÆ AÇAÅF OFÃAÆ AÇAÅô`.symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.1.rel.debug_info.debug_abbrev.rel.debug_loc.rel.debug_aranges.debug_ranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@~ Ô"@%À+À02À@C¼? #0O¼ âaž E] D'  pã l d' €‘ƒü t'0'¨0¦±ÃÅÄÁ |'ÈÏX!@ ˜"<ñÿ   ¡!°¡/`utf.cutf16_to_utf8exfat_errorutf8_to_utf16utf16_lengthin‹ÃÈ;@    ! & 3 : A H O V d k p { ˆ  š © ® » Ê Ù è ÷   $ 3 B Q ` o ~  œ « º É Ø ç ö   # 2 A P _ o v ‚  ž ê ö   ) D h y Ž š « À Ý î   #- ; I W ot ~Œ•™ ­¶ÀÄ ÓÜåëý ) > K VZ^h v „ ’ ª¯ ¹ÇÐÔ ãìõÿ $*<BPX cg~‹‘ ž ¬ 'ž®Û Œøutils.o/ 1341843650 1000 1000 100644 17972 ` ELF\34(ƒì<‰\$,‹\$H‰t$0‹T$@¾`‰|$4‰l$8öÉ߅-÷Ç…‰ñ1ÀÁé÷Æó«tfǃǃætÆ‹t$DöF,…Ê‹‚Œ÷Ð%ÿ€Ì€‰C‹‚½‹|$DÇC‰C‹‚”‹w0‹4‰C‹B‰s,‰{0‰t$¶Hl‰|$‹T$Óå¶Hm‹D$Óå‰ïÁÿƒÀÿƒÒÿèú‰l$‰|$ ‰$‰T$èüÿÿÿ‰ù‹t$D‹|$4¯Õ¯ÈÑ÷å‹l$8ʬРÁê ‰C8‹F8‰S<‹V<‹t$0‰CH‰S@‰CP‹\$,ƒÄ<Ãt&‹‚ˆ÷Ð%ÿ€Ì@‰Cé1ÿÿÿfǃîƒÇéßþÿÿÆ{f¾_éÄþÿÿ‰ö¼'ƒì‹D$(ÇD$ ‰D$‹D$ ƒÀ@‰D$‹D$$‰$èüÿÿÿ…ÀuƒÄÃÇ$èüÿÿÿfV1ÉS‹t$ 1Ò1Àt&Yþƒûv ¶ fÁÀȃƒú ‰Ñuä[^ÃS‹\$1É·D$ 1Òf¶ fÁÀƒÂȃú ‰Ñuì[Ãv¼'UWVS1Ûƒì<‹D$\‹|$T‹t$X‰$èüÿÿÿº‰ˆˆˆ1ɃÀ÷â1ÀÁêfkþƒýv ¶fÁÀ؃Áƒù ‰Ëuä0É1Û¶fÁÀƒÁ؃ù ‰Ëuì…Ò„‹kÒ‹l$\1ÿt$0´&1ÉÇD ƒÁƒù rðL=ÆD$Á‹‰\$‹Y‰\$‹Y‰\$‹Y ‰\$‹Y‰\$"‹Y‰\$&‹Y‰\$*·I»Áf‰L$.L$붃ÁfÁÀØ9ñuðƒÇ9×u‰‹T$Pf‰ƒÄ<‰Ð[^_]¶V1ÀS‹\$‹t$ …Ût%1Ò¶J–ƒùvƒúpt ¶ ÁÀȃÂ9Úuã[^ô&S‹\$ ‹D$…Ût‹T$Ót&¶ ÁÀƒÂÈ9Úuñ[ô&UWVSƒì‹\$8‹|$4‰$èüÿÿÿ…ÀtI‹o ‰Ú4C1Ûv··È9és‹G·H¶ÈƒÂfÁÃËfÁÃfÁèÃ9òuÕ‹D$0f‰ƒÄ[^_]Â1Ûëë´&U1íW¿V1öSƒìL‹D$`‹T$dÇD$(ÇD$,‰D$‰T$ÇD$0 ÇD$4 ÇD$8ÇD$<‰ê‰ø¬ÐÑêD$T$‰|$‰l$ ‰$‰T$èüÿÿÿ‰Ñ Át&‰Ó‰Á¬Ù Áë ¤Ë Áá 1Ó1Á Ët*ƒúw%=ÿ'w‹L$h‰‹D´(‰Q‰AƒÄL[^_]öƒÆ¤ý Áç ƒþuëÑë UW¿V‰ýSƒì<‹t$P‹\$T¶Nl‹FLÓå‹NH‰êÁú¯Å¯ÊÁ‹FH÷åʶNm‰T$‰D$‰ØÓå‰êÁú‰Ñ÷å¯Ë\$$‰D$¶FhʉT$‰D$¶FiÇ$ ‰D$èüÿÿÿ‰ú‰\$¶NlÓâ‰ÐÁø‰$‰D$èüÿÿÿ‹D$,‹T$(Ç$L‰D$ ‹D$$‰T$‰D$èüÿÿÿ‰\$¶NlÓç¶NmÓç‰úÁú‰<$‰T$èüÿÿÿ‹D$,‹T$(Ç$l‰D$ ‹D$$‰T$‰D$èüÿÿÿ‹D$‹T$‰\$‰$‰T$èüÿÿÿ‹D$,‹T$(Ç$Œ‰D$ ‹D$$‰T$‰D$èüÿÿÿ‹D$‹T$+D$T$‰\$‰$‰T$èüÿÿÿ‹D$,‹T$(Ç$¬‰D$ ‹D$$‰T$‰D$èüÿÿÿ‹D$‹T$‰\$‰$‰T$èüÿÿÿ‹D$,‹T$(Ç$̉D$ ‹D$$‰T$‰D$èüÿÿÿƒÄ<[^_]Ãfailed to convert name to UTF-8File system version %hhu.%hhu Sector size %10llu %s Cluster size %10llu %s Volume size %10llu %s Used space %10llu %s Available space %10llu %s bytesKBMBGBTBPB™˜@»¦TÕ0®›‹intÈÉS8a9hë†zt‡0È0i‰E±Šzh‹0Œ0tÝ7Žoá•Ýh¤Ý^ªoý8”çñZ#Q#ì#w# ¹#ä# #J#N# Ý#$ñ#(– #,þ"%#0â$+#4.&Z#8 *Z#<&,Ò#@%0>#D®1L#F21#G®6A#H?ä#LH#T†I#XJ#\”K#`›L%#dNZ#hAPG#l 8´ Ê º% £»%# ¯¼+# ŒÀZ#î& A ïç W ï']—]äÔB›àQ€Lö ôx· ´zö# L{Ý#½Z 6` '° „ )…#  *># ; .¦# © 0¼# Á 1Ç# Z 2# … 3›# é 4…# † 5>#( 3 9ä#, æ ;#4 à @#8 | IŽ#@  JŽ#H | KŽ#P ² [±#Xr 17Ë 2>È 40T ;hPó äP»#7PÜQ zQÆ#êQþR7 ÚRÑ#&R P Æ 1r y 3°# » 4°#& $™ ê &™# S '©# t (¹# l )7#@ * *7#H  +#P ö ,#T ‹ -#X ˆ .#\ i /#` f 0#d À 6M#h ` 7ó#j Z 8°#l 7 9°#m  :°#n W ;°#o A <°#p ~ =É#q D >ó#þ °© ï °¹ ï °É ï4 °ÚïŒ óê ï  x» – z°# E {°# ¹ |ó# ñ }ó# µ ~ó# $ ó# ¢ ó# ù €ó# ‡ €ó#  ó# 1 ó# Œ ‚°# S ƒ°# À „»# °Ë ï  ‹d – °# f ް# µ °# D °# \ ‘ó# À ’ó# Î “7# Ë ”d#   •# \ –7# °t ï ø š« – œ°# - °# „ žÚ#CD 5‹ ÿ 7‹ #  8‹ # » 9‹ # 5 :‹ # ò B# À ?B# ó @b#   AB#( f BZ#, \ CÑ#0 ù Dƒ#8  Dƒ#< „ E‘ #@« ó¢ ï Qñ   SB# \ TÆ# q Uñ # : VÆ# ½ WZ#° °¤ JÜ dev Lâ #sb Mè #  Nî # [ O%# ; P‹ # ï Y¢ # - Zô #(  \#„ ø ]Z#ˆ  ]Z#Œuid ^x#gid _m#”ro `Z#˜ ) aZ#œ a bZ# ¶Ü ró  ïZ l- ( nÑ# © oW#¤5»_ ¬5_ sum7»i8Ze ê@»œ ¬@·sum@»iBZCYóÀ vY»tYóêU»Û vUó WÑö vW7]g: ef: ‘OE ‘qP ‘@ ÷ K «ÃÕ/p®:Ý O/E ‘„/‘n/%‘š2È t‘t‘#@t‘t   ®Yt!- °ßr "? ¶#J á#U !j à@ $| ‘"‡ K#’ u% Ió”­©I_ ‘æJ­‘„J¸‘ &¹L»!&aM¾K'iNZ^(- @Pè "? r) #J ‘#U ¤*j `tQ"‡ Â+| ,`t#’ Õ-@j.Tt‘@/j öW"‡ è"| ,ö#’ *œ Yš"­ /,#¶ N -nt‘ ³Ë¾ó%+\Æ Xq0k\·µ0\\%à'i^% 'sum_Æ*%‰hÆ`‰Iskh·‘\h%‘1sumhÆu'ij%Ÿ%wqóø³4efq: ‘„q¸‘'is%K&&t%k&!u»‰2»ßò'cy»¿*œ ãê‚""­ Ò,ãê#¶ ñ §ntsÑ…Ñ£(…Ñ‘hb…£‘'i‡%®.nˆ©‘H& ‰ÑÁ&>ŠÑÙ W¹ ï›à¦ sb› ‘œÆ‘3hbž ‘T.ýŸb‘@.@ b‘H\†/t y4Dts†\tL¾4qts↉tlú4žts†¶tŒ>4Ëtsb†ãt¬z4øts ž†tÌr42¥+4‘¦+5Ö ­ZY66¸6%6%7Ø tn6W85\ ±%†6¸9ÖgZ6W8% : ; I$ > $ >   I : ; : ;I8 : ;  : ;  : ; I8 I !I/ &I& : ;  : ; !I/ : ; I8 < .? : ; ' I : ; I4: ; I: ; I.: ; ' I .? : ; ' @–B : ; I : ; I .? : ; ' @—B ‰‚1Š‚ ‘B ‰‚1!.1@—B "1#41$1 %.? : ; ' I@—B &4: ; I'4: ; I(1RUX Y ) U*1X Y +1, - U.4: ; I /1X Y 0: ; I1: ; I2 34: ; I 44: ; I? < 5.? : ; ' I< 6I7.? : ; ' < 89.? : ;' I< t*tÀ*0t0gtÀpsts¡t ¡¢t¢®t °±t±´t´Ýt ÝÞtÞßt°Ò‘ÒÞVÞß‘°¼0ŸÒßP°¼0ŸÕßRàátáttàî‘îøPýPàî0ŸýRttt tttÐttt tttïPPp>Rt‰0Ÿ>…W…‘R`PU^Q^`Sm‰Pm‰QéúPüPé‘@Ÿéï0ŸPpP“p“ !t!$t$Vt VWtWXt N‘NWVWX‘ U‘UVSVX‘ 20ŸQUR 20ŸNUP`ataˆtˆ‰t`s‘s~Pƒ‰P`s0Ÿ‘t‘’t’“t “”t”—t—ít0íîtîïtïðt ðñtñôtôøt0§µ0Ÿôø0Ÿ§µPôøP§µ0ŸÕÙSßãSôø0ŸÉÝPãîSîôpãîS“îôp“tt t  t tµt൶t¶·t·¸t ¸¹t¹ÀtÀÑtàÃÑVÊÑW“U“v¬P“R“ºÑP“R“àátáâtâèt èëtëîtî¡tС¢t¢£t£¤t ¤¥t¥¦t¦@`ƒ…ßä@`ƒ…ß䃅ßäzû libexfat/usr/lib/gcc/i486-linux-gnu/4.7/include/usr/include/i386-linux-gnu/bits/usr/include/usr/include/i386-linux-gnu/sysutils.cbyteorder.hstddef.htypes.hlibio.hstdio.htypes.htime.hstat.hstdint.hexfatfs.hexfat.h/Wƒ8Ù0iWGu=ge>;ŸIK5OyJ¥yJ/s>:?@E=?=rÈr(=+IÚ$* N+jƒœ¢M M+[K=-w¾oJ.>H„mÈ.jX.nXƒœ º/=-tw‚ <u  JYt4 XtXÄetQu#$* †¼Éy¯ …~y«M“t„…z@‰Ù»wžbJ*tržº#+#U&z.J„ð„ê&h’½gI==sÖä0V",J„åIƒöFLHhv»$ó$u$å$u$exfat_human_bytesfat_count_shortbufexfat_super_block_IO_lock_texfat_node_IO_buf_endsector_bitsflagssector_startfptr_indexbuffercluster_sector_start_IO_write_endunsigned intnextversionuint32_texfat_humanize_bytesst_blksize_flagsdmask_markers__nlink_tfptr_cluster__u_quad_tro_fallbackprevchunk_sizecontinuationsoem_nameutf16_length__ino_tchunkexfat_calc_name_hash_posstdoutGNU C 4.7.1exfat_start_checksumchecksumupcaselong long unsigned intst_blocksle32_t_IO_backup_base_offsetchildexfat_print_infodivisorvalue_filenostatrootavail_spacetv_nsecsize_tupcase_chars__mode_tstbuf_IO_read_basest_gidcrtime_cs_IO_save_end_nextst_mode__ino64_tmajorst_nlink_IO_markerexfat_get_name__u16jumpcmaptimespeccharfmask_modename_entryfat_sector_startsector_countspc_bitslibexfat/utils.c_IO_read_ptr__blkcnt64_tsectoruint8_t__u32time_tmdateexfat_add_checksumle64_to_cpuentryst_ino_IO_write_baselong long intprintf_IO_save_base__dev_tentry_offsetexfat_entry_meta1exfat_entry_meta2crtimeexfat_vbr_start_checksumboot_signature__quad_tsizenoatimerootdir_clusterminor__pad1__pad2__pad3__pad4__pad5crdateunit_vtable_offsetdirty__gid_tuint16_tgid_t__u64uid_tmeta2_IO_read_endmtimeparentshort intst_mtimlong inthashlength__unknownle16_ttempcpu_to_le16nodeuint64_texfat_stat__blksize_t__uid_tst_atimnameexfat_vbr_add_checksumstart_cluster_locktv_sec/home/thomas/source/exfat-utils-0.9.7sizetypele16_to_cpufat_sector_countlong unsigned intzero_cluster_old_offsetstdin_IO_FILEallocated_percentmtime_csname_hashvolume_serial__unused1__unused2cluster_counttypeunsigned charmeta1_sbuf__unknown1__unknown2__unknown3utf16_to_utf8_IO_write_ptrreferencestotal_spaceexfat_calc_checksum__time_tle64_tlabelst_size__st_inoname_lengthcluster_tst_uidname_entriesunits__off_tst_ctimst_devsigned charoff_tshort unsigned intexfatexfat_deventry_clusterreal_sizeexfat_bug_chainst_rdevattribexfat_entry_name_flags2atimefree_clusters_cur_columnadate__off64_t_unused2_IO_buf_basedrive_novolume_stateGCC: (Debian 4.7.1-2) 4.7.1zR| ˆ(gC@DƒL†M‡…  ÅÇÆÃF Hp>C n A d°/A†C ƒiÃAƈà&AƒdÃ8¤ A…A ‡A†AƒEPøCÃAÆ AÇAÅ à 8A†C ƒrÃAÆ`)AƒgÃ< hA…A ‡A†AƒC0V AÃAÆ AÇAÅC <`ÑA…C ‡F†CƒC`¥ AÃAÆ AÇAÅG < àÆA…A ‡F†CƒCP³AÃAÆ AÇAÅ.symtab.strtab.shstrtab.rel.text.data.bss.rodata.str1.4.rodata.str1.1.rel.debug_info.debug_abbrev.debug_loc.rel.debug_aranges.debug_ranges.rel.debug_line.debug_str.comment.note.GNU-stack.rel.eh_frame@¦ :ð%è+è02èì?2ÔRéN ;À ^†l‹Ž{% w ÌE Š9%`œ™%~˜ ÜE¨0(m³0„0¼¡0Ф0ÜÌ äEP€2Ú7 9ñÿ     gp>-;E°/Zà&m Ž 8§`)¾hÓÑèàÆùutils.c__udivdi3exfat_statexfat_get_nameutf16_to_utf8exfat_bugexfat_start_checksumexfat_add_checksumexfat_calc_checksumutf16_lengthexfat_vbr_start_checksumexfat_vbr_add_checksumexfat_calc_name_hashexfat_humanize_bytesexfat_print_infoprintfå–¥ª)£$4<DLrOXu„™ºÉÞö:I^v…š    ! & 3 : A H O V d k p { † ‘ œ § ² ½ È Ó à å ò ÷   " ' 4 C R a p  Ž  ¬ » Ê Ù è ÷   $ 3 B Q ` o ~  œ « º É Ø è ï û   c n y „  › © Ä Ð Þ ì ú   $ 2 @ N \ j x † ” ¢ ± ¼ Ç Ò å ô   ) 8 C V d s € Ž œ ª ¸ Æ Ô â ð þ   ( 6 D R ` n | Š ë ÷   ! / = K Y g u ƒ ‘ Ÿ ­ Ì Ø æ ô    , : H V u    ¬ ¹ Ç Õ ã ñ ÿ    )  7  E  S  a  o  }  «  ¹  Ç  Õ  ã  ø    -  ;  I  W  e  t  ƒ  ¾  Í  Ý        /  @  l  }   Á  Ü  ø  ÿ      ,  X  _ c g  q    ™ É × â æ ê  ø         2  ;  B  M Q U  _  m  {  ‰  “  ˜  ¢  ¯  ¸ ¼  Ë  Ð  Ù  â  í ñ    ' 9=H Q VZc os‚ ‡‹” ›Å ÐÔØ â ì ñ û    )-1 ; I a n u €„ˆ Ÿ µ º Ä É Ó ØÜí ÷û   #6 =AE O r w …  ” ž » ÂÆÊ á ü  *0EW]r„ŠŸ±·ÌÞäù & 4 [ p ˆ ) LhŒ¨ä$d¤partclone-0.2.51/src/exfat/log.c000066400000000000000000000041151200565264100164130ustar00rootroot00000000000000/* log.c (02.09.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include #include int exfat_errors; /* * This message means an internal bug in exFAT implementation. */ void exfat_bug(const char* format, ...) { va_list ap, aq; va_start(ap, format); va_copy(aq, ap); fflush(stdout); fputs("BUG: ", stderr); vfprintf(stderr, format, ap); va_end(ap); fputs(".\n", stderr); vsyslog(LOG_CRIT, format, aq); va_end(aq); abort(); } /* * This message means an error in exFAT file system. */ void exfat_error(const char* format, ...) { va_list ap, aq; exfat_errors++; va_start(ap, format); va_copy(aq, ap); fflush(stdout); fputs("ERROR: ", stderr); vfprintf(stderr, format, ap); va_end(ap); fputs(".\n", stderr); vsyslog(LOG_ERR, format, aq); va_end(aq); } /* * This message means that there is something unexpected in exFAT file system * that can be a potential problem. */ void exfat_warn(const char* format, ...) { va_list ap, aq; va_start(ap, format); va_copy(aq, ap); fflush(stdout); fputs("WARN: ", stderr); vfprintf(stderr, format, ap); va_end(ap); fputs(".\n", stderr); vsyslog(LOG_WARNING, format, aq); va_end(aq); } /* * Just debug message. Disabled by default. */ void exfat_debug(const char* format, ...) { va_list ap; fflush(stdout); fputs("DEBUG: ", stderr); va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); fputs(".\n", stderr); } partclone-0.2.51/src/exfat/lookup.c000066400000000000000000000112541200565264100171450ustar00rootroot00000000000000/* lookup.c (02.09.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include #include #include int exfat_opendir(struct exfat* ef, struct exfat_node* dir, struct exfat_iterator* it) { int rc; exfat_get_node(dir); it->parent = dir; it->current = NULL; rc = exfat_cache_directory(ef, dir); if (rc != 0) exfat_put_node(ef, dir); return rc; } void exfat_closedir(struct exfat* ef, struct exfat_iterator* it) { exfat_put_node(ef, it->parent); it->parent = NULL; it->current = NULL; } struct exfat_node* exfat_readdir(struct exfat* ef, struct exfat_iterator* it) { if (it->current == NULL) it->current = it->parent->child; else it->current = it->current->next; if (it->current != NULL) return exfat_get_node(it->current); else return NULL; } static int compare_char(struct exfat* ef, uint16_t a, uint16_t b) { if (a >= ef->upcase_chars || b >= ef->upcase_chars) return (int) a - (int) b; return (int) le16_to_cpu(ef->upcase[a]) - (int) le16_to_cpu(ef->upcase[b]); } static int compare_name(struct exfat* ef, const le16_t* a, const le16_t* b) { while (le16_to_cpu(*a) && le16_to_cpu(*b)) { int rc = compare_char(ef, le16_to_cpu(*a), le16_to_cpu(*b)); if (rc != 0) return rc; a++; b++; } return compare_char(ef, le16_to_cpu(*a), le16_to_cpu(*b)); } static int lookup_name(struct exfat* ef, struct exfat_node* parent, struct exfat_node** node, const char* name, size_t n) { struct exfat_iterator it; le16_t buffer[EXFAT_NAME_MAX + 1]; int rc; *node = NULL; rc = utf8_to_utf16(buffer, name, EXFAT_NAME_MAX, n); if (rc != 0) return rc; rc = exfat_opendir(ef, parent, &it); if (rc != 0) return rc; while ((*node = exfat_readdir(ef, &it))) { if (compare_name(ef, buffer, (*node)->name) == 0) { exfat_closedir(ef, &it); return 0; } exfat_put_node(ef, *node); } exfat_closedir(ef, &it); return -ENOENT; } static size_t get_comp(const char* path, const char** comp) { const char* end; *comp = path + strspn(path, "/"); /* skip leading slashes */ end = strchr(*comp, '/'); if (end == NULL) return strlen(*comp); else return end - *comp; } int exfat_lookup(struct exfat* ef, struct exfat_node** node, const char* path) { struct exfat_node* parent; const char* p; size_t n; int rc; /* start from the root directory */ parent = *node = exfat_get_node(ef->root); for (p = path; (n = get_comp(p, &p)); p += n) { if (n == 1 && *p == '.') /* skip "." component */ continue; rc = lookup_name(ef, parent, node, p, n); if (rc != 0) { exfat_put_node(ef, parent); return rc; } exfat_put_node(ef, parent); parent = *node; } return 0; } static int is_last_comp(const char* comp, size_t length) { const char* p = comp + length; return get_comp(p, &p) == 0; } static int is_allowed(const char* comp, size_t length) { size_t i; for (i = 0; i < length; i++) switch (comp[i]) { case 0x01 ... 0x1f: case '/': case '\\': case ':': case '*': case '?': case '"': case '<': case '>': case '|': return 0; } return 1; } int exfat_split(struct exfat* ef, struct exfat_node** parent, struct exfat_node** node, le16_t* name, const char* path) { const char* p; size_t n; int rc; memset(name, 0, (EXFAT_NAME_MAX + 1) * sizeof(le16_t)); *parent = *node = exfat_get_node(ef->root); for (p = path; (n = get_comp(p, &p)); p += n) { if (n == 1 && *p == '.') continue; if (is_last_comp(p, n)) { if (!is_allowed(p, n)) { /* contains characters that are not allowed */ exfat_put_node(ef, *parent); return -ENOENT; } rc = utf8_to_utf16(name, p, EXFAT_NAME_MAX, n); if (rc != 0) { exfat_put_node(ef, *parent); return rc; } rc = lookup_name(ef, *parent, node, p, n); if (rc != 0 && rc != -ENOENT) { exfat_put_node(ef, *parent); return rc; } return 0; } rc = lookup_name(ef, *parent, node, p, n); if (rc != 0) { exfat_put_node(ef, *parent); return rc; } exfat_put_node(ef, *parent); *parent = *node; } exfat_bug("impossible"); } partclone-0.2.51/src/exfat/mount.c000066400000000000000000000177731200565264100170120ustar00rootroot00000000000000/* mount.c (22.10.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include #include #include #include #include static uint64_t rootdir_size(const struct exfat* ef) { uint64_t clusters = 0; cluster_t rootdir_cluster = le32_to_cpu(ef->sb->rootdir_cluster); while (!CLUSTER_INVALID(rootdir_cluster)) { clusters++; /* root directory cannot be contiguous because there is no flag to indicate this */ rootdir_cluster = exfat_next_cluster(ef, ef->root, rootdir_cluster); } return clusters * CLUSTER_SIZE(*ef->sb); } static const char* get_option(const char* options, const char* option_name) { const char* p; size_t length = strlen(option_name); for (p = strstr(options, option_name); p; p = strstr(p + 1, option_name)) if ((p == options || p[-1] == ',') && p[length] == '=') return p + length + 1; return NULL; } static int get_int_option(const char* options, const char* option_name, int base, int default_value) { const char* p = get_option(options, option_name); if (p == NULL) return default_value; return strtol(p, NULL, base); } static int match_option(const char* options, const char* option_name) { const char* p; size_t length = strlen(option_name); for (p = strstr(options, option_name); p; p = strstr(p + 1, option_name)) if ((p == options || p[-1] == ',') && (p[length] == ',' || p[length] == '\0')) return 1; return 0; } static void parse_options(struct exfat* ef, const char* options) { int sys_umask = umask(0); int opt_umask; umask(sys_umask); /* restore umask */ opt_umask = get_int_option(options, "umask", 8, sys_umask); ef->dmask = get_int_option(options, "dmask", 8, opt_umask) & 0777; ef->fmask = get_int_option(options, "fmask", 8, opt_umask) & 0777; ef->uid = get_int_option(options, "uid", 10, geteuid()); ef->gid = get_int_option(options, "gid", 10, getegid()); ef->ro = match_option(options, "ro"); ef->noatime = match_option(options, "noatime"); } static int verify_vbr_checksum(struct exfat_dev* dev, void* sector, off_t sector_size) { uint32_t vbr_checksum; int i; exfat_pread(dev, sector, sector_size, 0); vbr_checksum = exfat_vbr_start_checksum(sector, sector_size); for (i = 1; i < 11; i++) { exfat_pread(dev, sector, sector_size, i * sector_size); vbr_checksum = exfat_vbr_add_checksum(sector, sector_size, vbr_checksum); } exfat_pread(dev, sector, sector_size, i * sector_size); for (i = 0; i < sector_size / sizeof(vbr_checksum); i++) if (le32_to_cpu(((const le32_t*) sector)[i]) != vbr_checksum) { exfat_error("invalid VBR checksum 0x%x (expected 0x%x)", le32_to_cpu(((const le32_t*) sector)[i]), vbr_checksum); return 1; } return 0; } static int commit_super_block(const struct exfat* ef) { exfat_pwrite(ef->dev, ef->sb, sizeof(struct exfat_super_block), 0); return exfat_fsync(ef->dev); } static int prepare_super_block(const struct exfat* ef) { if (le16_to_cpu(ef->sb->volume_state) & EXFAT_STATE_MOUNTED) exfat_warn("volume was not unmounted cleanly"); if (ef->ro) return 0; ef->sb->volume_state = cpu_to_le16( le16_to_cpu(ef->sb->volume_state) | EXFAT_STATE_MOUNTED); return commit_super_block(ef); } int exfat_mount(struct exfat* ef, const char* spec, const char* options) { int rc; exfat_tzset(); memset(ef, 0, sizeof(struct exfat)); parse_options(ef, options); ef->dev = exfat_open(spec, ef->ro); if (ef->dev == NULL) { if (ef->ro || !match_option(options, "ro_fallback")) return -EIO; ef->dev = exfat_open(spec, 1); if (ef->dev == NULL) return -EIO; exfat_warn("device is write-protected, mounting read-only"); ef->ro_fallback = ef->ro = 1; } ef->sb = malloc(sizeof(struct exfat_super_block)); if (ef->sb == NULL) { exfat_close(ef->dev); exfat_error("failed to allocate memory for the super block"); return -ENOMEM; } memset(ef->sb, 0, sizeof(struct exfat_super_block)); exfat_pread(ef->dev, ef->sb, sizeof(struct exfat_super_block), 0); if (memcmp(ef->sb->oem_name, "EXFAT ", 8) != 0) { exfat_close(ef->dev); free(ef->sb); exfat_error("exFAT file system is not found"); return -EIO; } if (ef->sb->version.major != 1 || ef->sb->version.minor != 0) { exfat_close(ef->dev); exfat_error("unsupported exFAT version: %hhu.%hhu", ef->sb->version.major, ef->sb->version.minor); free(ef->sb); return -EIO; } if (ef->sb->fat_count != 1) { exfat_close(ef->dev); free(ef->sb); exfat_error("unsupported FAT count: %hhu", ef->sb->fat_count); return -EIO; } /* officially exFAT supports cluster size up to 32 MB */ if ((int) ef->sb->sector_bits + (int) ef->sb->spc_bits > 25) { exfat_close(ef->dev); free(ef->sb); exfat_error("too big cluster size: 2^%d", (int) ef->sb->sector_bits + (int) ef->sb->spc_bits); return -EIO; } ef->zero_cluster = malloc(CLUSTER_SIZE(*ef->sb)); if (ef->zero_cluster == NULL) { exfat_close(ef->dev); free(ef->sb); exfat_error("failed to allocate zero sector"); return -ENOMEM; } /* use zero_cluster as a temporary buffer for VBR checksum verification */ if (verify_vbr_checksum(ef->dev, ef->zero_cluster, SECTOR_SIZE(*ef->sb)) != 0) { free(ef->zero_cluster); exfat_close(ef->dev); free(ef->sb); return -EIO; } memset(ef->zero_cluster, 0, CLUSTER_SIZE(*ef->sb)); ef->root = malloc(sizeof(struct exfat_node)); if (ef->root == NULL) { free(ef->zero_cluster); exfat_close(ef->dev); free(ef->sb); exfat_error("failed to allocate root node"); return -ENOMEM; } memset(ef->root, 0, sizeof(struct exfat_node)); ef->root->flags = EXFAT_ATTRIB_DIR; ef->root->start_cluster = le32_to_cpu(ef->sb->rootdir_cluster); ef->root->fptr_cluster = ef->root->start_cluster; ef->root->name[0] = cpu_to_le16('\0'); ef->root->size = rootdir_size(ef); /* exFAT does not have time attributes for the root directory */ ef->root->mtime = 0; ef->root->atime = 0; /* always keep at least 1 reference to the root node */ exfat_get_node(ef->root); rc = exfat_cache_directory(ef, ef->root); if (rc != 0) goto error; if (ef->upcase == NULL) { exfat_error("upcase table is not found"); goto error; } if (ef->cmap.chunk == NULL) { exfat_error("clusters bitmap is not found"); goto error; } if (prepare_super_block(ef) != 0) goto error; return 0; error: exfat_put_node(ef, ef->root); exfat_reset_cache(ef); free(ef->root); free(ef->zero_cluster); exfat_close(ef->dev); free(ef->sb); return -EIO; } static void finalize_super_block(struct exfat* ef) { if (ef->ro) return; ef->sb->volume_state = cpu_to_le16( le16_to_cpu(ef->sb->volume_state) & ~EXFAT_STATE_MOUNTED); /* Some implementations set the percentage of allocated space to 0xff on FS creation and never update it. In this case leave it as is. */ if (ef->sb->allocated_percent != 0xff) { uint32_t free, total; free = exfat_count_free_clusters(ef); total = le32_to_cpu(ef->sb->cluster_count); ef->sb->allocated_percent = ((total - free) * 100 + total / 2) / total; } commit_super_block(ef); } void exfat_unmount(struct exfat* ef) { exfat_put_node(ef, ef->root); exfat_reset_cache(ef); free(ef->root); ef->root = NULL; finalize_super_block(ef); exfat_close(ef->dev); /* close descriptor immediately after fsync */ ef->dev = NULL; free(ef->zero_cluster); ef->zero_cluster = NULL; free(ef->cmap.chunk); ef->cmap.chunk = NULL; free(ef->sb); ef->sb = NULL; free(ef->upcase); ef->upcase = NULL; ef->upcase_chars = 0; } partclone-0.2.51/src/exfat/node.c000066400000000000000000000641351200565264100165670ustar00rootroot00000000000000/* node.c (09.10.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include #include #include /* on-disk nodes iterator */ struct iterator { cluster_t cluster; off_t offset; int contiguous; char* chunk; }; struct exfat_node* exfat_get_node(struct exfat_node* node) { /* if we switch to multi-threaded mode we will need atomic increment here and atomic decrement in exfat_put_node() */ node->references++; return node; } void exfat_put_node(struct exfat* ef, struct exfat_node* node) { if (--node->references < 0) { char buffer[EXFAT_NAME_MAX + 1]; exfat_get_name(node, buffer, EXFAT_NAME_MAX); exfat_bug("reference counter of `%s' is below zero", buffer); } if (node->references == 0) { if (node->flags & EXFAT_ATTRIB_DIRTY) exfat_flush_node(ef, node); if (node->flags & EXFAT_ATTRIB_UNLINKED) { /* free all clusters and node structure itself */ exfat_truncate(ef, node, 0); free(node); } if (ef->cmap.dirty) exfat_flush_cmap(ef); } } /** * Cluster + offset from the beginning of the directory to absolute offset. */ static off_t co2o(struct exfat* ef, cluster_t cluster, off_t offset) { return exfat_c2o(ef, cluster) + offset % CLUSTER_SIZE(*ef->sb); } static int opendir(struct exfat* ef, const struct exfat_node* dir, struct iterator* it) { if (!(dir->flags & EXFAT_ATTRIB_DIR)) exfat_bug("not a directory"); it->cluster = dir->start_cluster; it->offset = 0; it->contiguous = IS_CONTIGUOUS(*dir); it->chunk = malloc(CLUSTER_SIZE(*ef->sb)); if (it->chunk == NULL) { exfat_error("out of memory"); return -ENOMEM; } exfat_pread(ef->dev, it->chunk, CLUSTER_SIZE(*ef->sb), exfat_c2o(ef, it->cluster)); return 0; } static void closedir(struct iterator* it) { it->cluster = 0; it->offset = 0; it->contiguous = 0; free(it->chunk); it->chunk = NULL; } static int fetch_next_entry(struct exfat* ef, const struct exfat_node* parent, struct iterator* it) { /* move iterator to the next entry in the directory */ it->offset += sizeof(struct exfat_entry); /* fetch the next cluster if needed */ if ((it->offset & (CLUSTER_SIZE(*ef->sb) - 1)) == 0) { /* reached the end of directory; the caller should check this condition too */ if (it->offset >= parent->size) return 0; it->cluster = exfat_next_cluster(ef, parent, it->cluster); if (CLUSTER_INVALID(it->cluster)) { exfat_error("invalid cluster while reading directory"); return 1; } exfat_pread(ef->dev, it->chunk, CLUSTER_SIZE(*ef->sb), exfat_c2o(ef, it->cluster)); } return 0; } static struct exfat_node* allocate_node(void) { struct exfat_node* node = malloc(sizeof(struct exfat_node)); if (node == NULL) { exfat_error("failed to allocate node"); return NULL; } memset(node, 0, sizeof(struct exfat_node)); return node; } static void init_node_meta1(struct exfat_node* node, const struct exfat_entry_meta1* meta1) { node->flags = le16_to_cpu(meta1->attrib); node->mtime = exfat_exfat2unix(meta1->mdate, meta1->mtime, meta1->mtime_cs); /* there is no centiseconds field for atime */ node->atime = exfat_exfat2unix(meta1->adate, meta1->atime, 0); } static void init_node_meta2(struct exfat_node* node, const struct exfat_entry_meta2* meta2) { node->size = le64_to_cpu(meta2->size); node->start_cluster = le32_to_cpu(meta2->start_cluster); node->fptr_cluster = node->start_cluster; if (meta2->flags & EXFAT_FLAG_CONTIGUOUS) node->flags |= EXFAT_ATTRIB_CONTIGUOUS; } static const struct exfat_entry* get_entry_ptr(const struct exfat* ef, const struct iterator* it) { return (const struct exfat_entry*) (it->chunk + it->offset % CLUSTER_SIZE(*ef->sb)); } /* * Reads one entry in directory at position pointed by iterator and fills * node structure. */ static int readdir(struct exfat* ef, const struct exfat_node* parent, struct exfat_node** node, struct iterator* it) { int rc = -EIO; const struct exfat_entry* entry; const struct exfat_entry_meta1* meta1; const struct exfat_entry_meta2* meta2; const struct exfat_entry_name* file_name; const struct exfat_entry_upcase* upcase; const struct exfat_entry_bitmap* bitmap; const struct exfat_entry_label* label; uint8_t continuations = 0; le16_t* namep = NULL; uint16_t reference_checksum = 0; uint16_t actual_checksum = 0; *node = NULL; for (;;) { if (it->offset >= parent->size) { if (continuations != 0) { exfat_error("expected %hhu continuations", continuations); goto error; } return -ENOENT; /* that's OK, means end of directory */ } entry = get_entry_ptr(ef, it); switch (entry->type) { case EXFAT_ENTRY_FILE: if (continuations != 0) { exfat_error("expected %hhu continuations before new entry", continuations); goto error; } meta1 = (const struct exfat_entry_meta1*) entry; continuations = meta1->continuations; /* each file entry must have at least 2 continuations: info and name */ if (continuations < 2) { exfat_error("too few continuations (%hhu)", continuations); goto error; } reference_checksum = le16_to_cpu(meta1->checksum); actual_checksum = exfat_start_checksum(meta1); *node = allocate_node(); if (*node == NULL) { rc = -ENOMEM; goto error; } /* new node has zero reference counter */ (*node)->entry_cluster = it->cluster; (*node)->entry_offset = it->offset; init_node_meta1(*node, meta1); namep = (*node)->name; break; case EXFAT_ENTRY_FILE_INFO: if (continuations < 2) { exfat_error("unexpected continuation (%hhu)", continuations); goto error; } meta2 = (const struct exfat_entry_meta2*) entry; if (meta2->flags & ~(EXFAT_FLAG_ALWAYS1 | EXFAT_FLAG_CONTIGUOUS)) { exfat_error("unknown flags in meta2 (0x%hhx)", meta2->flags); goto error; } init_node_meta2(*node, meta2); actual_checksum = exfat_add_checksum(entry, actual_checksum); /* There are two fields that contain file size. Maybe they plan to add compression support in the future and one of those fields is visible (uncompressed) size and the other is real (compressed) size. Anyway, currently it looks like exFAT does not support compression and both fields must be equal. */ if (le64_to_cpu(meta2->real_size) != (*node)->size) { exfat_error("real size does not equal to size " "(%"PRIu64" != %"PRIu64")", le64_to_cpu(meta2->real_size), (*node)->size); goto error; } /* empty files must be marked as non-contiguous */ if ((*node)->size == 0 && (meta2->flags & EXFAT_FLAG_CONTIGUOUS)) { exfat_error("empty file marked as contiguous (0x%hhx)", meta2->flags); goto error; } /* directories must be aligned on at cluster boundary */ if (((*node)->flags & EXFAT_ATTRIB_DIR) && (*node)->size % CLUSTER_SIZE(*ef->sb) != 0) { char buffer[EXFAT_NAME_MAX + 1]; exfat_get_name(*node, buffer, EXFAT_NAME_MAX); exfat_error("directory `%s' has invalid size %"PRIu64" bytes", buffer, (*node)->size); goto error; } --continuations; break; case EXFAT_ENTRY_FILE_NAME: if (continuations == 0) { exfat_error("unexpected continuation"); goto error; } file_name = (const struct exfat_entry_name*) entry; actual_checksum = exfat_add_checksum(entry, actual_checksum); memcpy(namep, file_name->name, EXFAT_ENAME_MAX * sizeof(le16_t)); namep += EXFAT_ENAME_MAX; if (--continuations == 0) { if (actual_checksum != reference_checksum) { exfat_error("invalid checksum (0x%hx != 0x%hx)", actual_checksum, reference_checksum); goto error; } if (fetch_next_entry(ef, parent, it) != 0) goto error; return 0; /* entry completed */ } break; case EXFAT_ENTRY_UPCASE: if (ef->upcase != NULL) break; upcase = (const struct exfat_entry_upcase*) entry; if (CLUSTER_INVALID(le32_to_cpu(upcase->start_cluster))) { exfat_error("invalid cluster in upcase table"); goto error; } if (le64_to_cpu(upcase->size) == 0 || le64_to_cpu(upcase->size) > 0xffff * sizeof(uint16_t) || le64_to_cpu(upcase->size) % sizeof(uint16_t) != 0) { exfat_error("bad upcase table size (%"PRIu64" bytes)", le64_to_cpu(upcase->size)); goto error; } ef->upcase = malloc(le64_to_cpu(upcase->size)); if (ef->upcase == NULL) { exfat_error("failed to allocate upcase table (%"PRIu64" bytes)", le64_to_cpu(upcase->size)); rc = -ENOMEM; goto error; } ef->upcase_chars = le64_to_cpu(upcase->size) / sizeof(le16_t); exfat_pread(ef->dev, ef->upcase, le64_to_cpu(upcase->size), exfat_c2o(ef, le32_to_cpu(upcase->start_cluster))); break; case EXFAT_ENTRY_BITMAP: bitmap = (const struct exfat_entry_bitmap*) entry; if (CLUSTER_INVALID(le32_to_cpu(bitmap->start_cluster))) { exfat_error("invalid cluster in clusters bitmap"); goto error; } ef->cmap.size = le32_to_cpu(ef->sb->cluster_count) - EXFAT_FIRST_DATA_CLUSTER; if (le64_to_cpu(bitmap->size) < (ef->cmap.size + 7) / 8) { exfat_error("invalid clusters bitmap size: %"PRIu64 " (expected at least %u)", le64_to_cpu(bitmap->size), (ef->cmap.size + 7) / 8); goto error; } ef->cmap.start_cluster = le32_to_cpu(bitmap->start_cluster); /* FIXME bitmap can be rather big, up to 512 MB */ ef->cmap.chunk_size = ef->cmap.size; ef->cmap.chunk = malloc(le64_to_cpu(bitmap->size)); if (ef->cmap.chunk == NULL) { exfat_error("failed to allocate clusters bitmap chunk " "(%"PRIu64" bytes)", le64_to_cpu(bitmap->size)); rc = -ENOMEM; goto error; } exfat_pread(ef->dev, ef->cmap.chunk, le64_to_cpu(bitmap->size), exfat_c2o(ef, ef->cmap.start_cluster)); break; case EXFAT_ENTRY_LABEL: label = (const struct exfat_entry_label*) entry; if (label->length > EXFAT_ENAME_MAX) { exfat_error("too long label (%hhu chars)", label->length); goto error; } if (utf16_to_utf8(ef->label, label->name, sizeof(ef->label), EXFAT_ENAME_MAX) != 0) goto error; break; default: if (entry->type & EXFAT_ENTRY_VALID) { exfat_error("unknown entry type 0x%hhx", entry->type); goto error; } break; } if (fetch_next_entry(ef, parent, it) != 0) goto error; } /* we never reach here */ error: free(*node); *node = NULL; return rc; } int exfat_cache_directory(struct exfat* ef, struct exfat_node* dir) { struct iterator it; int rc; struct exfat_node* node; struct exfat_node* current = NULL; if (dir->flags & EXFAT_ATTRIB_CACHED) return 0; /* already cached */ rc = opendir(ef, dir, &it); if (rc != 0) return rc; while ((rc = readdir(ef, dir, &node, &it)) == 0) { node->parent = dir; if (current != NULL) { current->next = node; node->prev = current; } else dir->child = node; current = node; } closedir(&it); if (rc != -ENOENT) { /* rollback */ for (current = dir->child; current; current = node) { node = current->next; free(current); } dir->child = NULL; return rc; } dir->flags |= EXFAT_ATTRIB_CACHED; return 0; } static void reset_cache(struct exfat* ef, struct exfat_node* node) { struct exfat_node* child; struct exfat_node* next; for (child = node->child; child; child = next) { reset_cache(ef, child); next = child->next; free(child); } if (node->references != 0) { char buffer[EXFAT_NAME_MAX + 1]; exfat_get_name(node, buffer, EXFAT_NAME_MAX); exfat_warn("non-zero reference counter (%d) for `%s'", node->references, buffer); } while (node->references--) exfat_put_node(ef, node); node->child = NULL; node->flags &= ~EXFAT_ATTRIB_CACHED; } void exfat_reset_cache(struct exfat* ef) { reset_cache(ef, ef->root); } void next_entry(struct exfat* ef, const struct exfat_node* parent, cluster_t* cluster, off_t* offset) { *offset += sizeof(struct exfat_entry); if (*offset % CLUSTER_SIZE(*ef->sb) == 0) /* next cluster cannot be invalid */ *cluster = exfat_next_cluster(ef, parent, *cluster); } void exfat_flush_node(struct exfat* ef, struct exfat_node* node) { cluster_t cluster; off_t offset; off_t meta1_offset, meta2_offset; struct exfat_entry_meta1 meta1; struct exfat_entry_meta2 meta2; if (ef->ro) exfat_bug("unable to flush node to read-only FS"); if (node->parent == NULL) return; /* do not flush unlinked node */ cluster = node->entry_cluster; offset = node->entry_offset; meta1_offset = co2o(ef, cluster, offset); next_entry(ef, node->parent, &cluster, &offset); meta2_offset = co2o(ef, cluster, offset); exfat_pread(ef->dev, &meta1, sizeof(meta1), meta1_offset); if (meta1.type != EXFAT_ENTRY_FILE) exfat_bug("invalid type of meta1: 0x%hhx", meta1.type); meta1.attrib = cpu_to_le16(node->flags); exfat_unix2exfat(node->mtime, &meta1.mdate, &meta1.mtime, &meta1.mtime_cs); exfat_unix2exfat(node->atime, &meta1.adate, &meta1.atime, NULL); exfat_pread(ef->dev, &meta2, sizeof(meta2), meta2_offset); if (meta2.type != EXFAT_ENTRY_FILE_INFO) exfat_bug("invalid type of meta2: 0x%hhx", meta2.type); meta2.size = meta2.real_size = cpu_to_le64(node->size); meta2.start_cluster = cpu_to_le32(node->start_cluster); meta2.flags = EXFAT_FLAG_ALWAYS1; /* empty files must not be marked as contiguous */ if (node->size != 0 && IS_CONTIGUOUS(*node)) meta2.flags |= EXFAT_FLAG_CONTIGUOUS; /* name hash remains unchanged, no need to recalculate it */ meta1.checksum = exfat_calc_checksum(&meta1, &meta2, node->name); exfat_pwrite(ef->dev, &meta1, sizeof(meta1), meta1_offset); exfat_pwrite(ef->dev, &meta2, sizeof(meta2), meta2_offset); node->flags &= ~EXFAT_ATTRIB_DIRTY; } static void erase_entry(struct exfat* ef, struct exfat_node* node) { cluster_t cluster = node->entry_cluster; off_t offset = node->entry_offset; int name_entries = DIV_ROUND_UP(utf16_length(node->name), EXFAT_ENAME_MAX); uint8_t entry_type; entry_type = EXFAT_ENTRY_FILE & ~EXFAT_ENTRY_VALID; exfat_pwrite(ef->dev, &entry_type, 1, co2o(ef, cluster, offset)); next_entry(ef, node->parent, &cluster, &offset); entry_type = EXFAT_ENTRY_FILE_INFO & ~EXFAT_ENTRY_VALID; exfat_pwrite(ef->dev, &entry_type, 1, co2o(ef, cluster, offset)); while (name_entries--) { next_entry(ef, node->parent, &cluster, &offset); entry_type = EXFAT_ENTRY_FILE_NAME & ~EXFAT_ENTRY_VALID; exfat_pwrite(ef->dev, &entry_type, 1, co2o(ef, cluster, offset)); } } static void tree_detach(struct exfat_node* node) { if (node->prev) node->prev->next = node->next; else /* this is the first node in the list */ node->parent->child = node->next; if (node->next) node->next->prev = node->prev; node->parent = NULL; node->prev = NULL; node->next = NULL; } static void tree_attach(struct exfat_node* dir, struct exfat_node* node) { node->parent = dir; if (dir->child) { dir->child->prev = node; node->next = dir->child; } dir->child = node; } static int shrink_directory(struct exfat* ef, struct exfat_node* dir, off_t deleted_offset) { const struct exfat_node* node; const struct exfat_node* last_node; uint64_t entries = 0; uint64_t new_size; int rc; if (!(dir->flags & EXFAT_ATTRIB_DIR)) exfat_bug("attempted to shrink a file"); if (!(dir->flags & EXFAT_ATTRIB_CACHED)) exfat_bug("attempted to shrink uncached directory"); for (last_node = node = dir->child; node; node = node->next) { if (deleted_offset < node->entry_offset) { /* there are other entries after the removed one, no way to shrink this directory */ return 0; } if (last_node->entry_offset < node->entry_offset) last_node = node; } if (last_node) { /* offset of the last entry */ entries += last_node->entry_offset / sizeof(struct exfat_entry); /* two subentries with meta info */ entries += 2; /* subentries with file name */ entries += DIV_ROUND_UP(utf16_length(last_node->name), EXFAT_ENAME_MAX); } new_size = DIV_ROUND_UP(entries * sizeof(struct exfat_entry), CLUSTER_SIZE(*ef->sb)) * CLUSTER_SIZE(*ef->sb); if (new_size == 0) /* directory always has at least 1 cluster */ new_size = CLUSTER_SIZE(*ef->sb); if (new_size == dir->size) return 0; rc = exfat_truncate(ef, dir, new_size); if (rc != 0) return rc; return 0; } static int delete(struct exfat* ef, struct exfat_node* node) { struct exfat_node* parent = node->parent; off_t deleted_offset = node->entry_offset; int rc; exfat_get_node(parent); erase_entry(ef, node); exfat_update_mtime(parent); tree_detach(node); rc = shrink_directory(ef, parent, deleted_offset); exfat_put_node(ef, parent); /* file clusters will be freed when node reference counter becomes 0 */ node->flags |= EXFAT_ATTRIB_UNLINKED; return rc; } int exfat_unlink(struct exfat* ef, struct exfat_node* node) { if (node->flags & EXFAT_ATTRIB_DIR) return -EISDIR; return delete(ef, node); } int exfat_rmdir(struct exfat* ef, struct exfat_node* node) { if (!(node->flags & EXFAT_ATTRIB_DIR)) return -ENOTDIR; /* check that directory is empty */ exfat_cache_directory(ef, node); if (node->child) return -ENOTEMPTY; return delete(ef, node); } static int grow_directory(struct exfat* ef, struct exfat_node* dir, uint64_t asize, uint32_t difference) { return exfat_truncate(ef, dir, DIV_ROUND_UP(asize + difference, CLUSTER_SIZE(*ef->sb)) * CLUSTER_SIZE(*ef->sb)); } static int find_slot(struct exfat* ef, struct exfat_node* dir, cluster_t* cluster, off_t* offset, int subentries) { struct iterator it; int rc; const struct exfat_entry* entry; int contiguous = 0; rc = opendir(ef, dir, &it); if (rc != 0) return rc; for (;;) { if (contiguous == 0) { *cluster = it.cluster; *offset = it.offset; } entry = get_entry_ptr(ef, &it); if (entry->type & EXFAT_ENTRY_VALID) contiguous = 0; else contiguous++; if (contiguous == subentries) break; /* suitable slot is found */ if (it.offset + sizeof(struct exfat_entry) >= dir->size) { rc = grow_directory(ef, dir, dir->size, (subentries - contiguous) * sizeof(struct exfat_entry)); if (rc != 0) { closedir(&it); return rc; } } if (fetch_next_entry(ef, dir, &it) != 0) { closedir(&it); return -EIO; } } closedir(&it); return 0; } static int write_entry(struct exfat* ef, struct exfat_node* dir, const le16_t* name, cluster_t cluster, off_t offset, uint16_t attrib) { struct exfat_node* node; struct exfat_entry_meta1 meta1; struct exfat_entry_meta2 meta2; const size_t name_length = utf16_length(name); const int name_entries = DIV_ROUND_UP(name_length, EXFAT_ENAME_MAX); int i; node = allocate_node(); if (node == NULL) return -ENOMEM; node->entry_cluster = cluster; node->entry_offset = offset; memcpy(node->name, name, name_length * sizeof(le16_t)); memset(&meta1, 0, sizeof(meta1)); meta1.type = EXFAT_ENTRY_FILE; meta1.continuations = 1 + name_entries; meta1.attrib = cpu_to_le16(attrib); exfat_unix2exfat(time(NULL), &meta1.crdate, &meta1.crtime, &meta1.crtime_cs); meta1.adate = meta1.mdate = meta1.crdate; meta1.atime = meta1.mtime = meta1.crtime; meta1.mtime_cs = meta1.crtime_cs; /* there is no atime_cs */ memset(&meta2, 0, sizeof(meta2)); meta2.type = EXFAT_ENTRY_FILE_INFO; meta2.flags = EXFAT_FLAG_ALWAYS1; meta2.name_length = name_length; meta2.name_hash = exfat_calc_name_hash(ef, node->name); meta2.start_cluster = cpu_to_le32(EXFAT_CLUSTER_FREE); meta1.checksum = exfat_calc_checksum(&meta1, &meta2, node->name); exfat_pwrite(ef->dev, &meta1, sizeof(meta1), co2o(ef, cluster, offset)); next_entry(ef, dir, &cluster, &offset); exfat_pwrite(ef->dev, &meta2, sizeof(meta2), co2o(ef, cluster, offset)); for (i = 0; i < name_entries; i++) { struct exfat_entry_name name_entry = {EXFAT_ENTRY_FILE_NAME, 0}; memcpy(name_entry.name, node->name + i * EXFAT_ENAME_MAX, EXFAT_ENAME_MAX * sizeof(le16_t)); next_entry(ef, dir, &cluster, &offset); exfat_pwrite(ef->dev, &name_entry, sizeof(name_entry), co2o(ef, cluster, offset)); } init_node_meta1(node, &meta1); init_node_meta2(node, &meta2); tree_attach(dir, node); exfat_update_mtime(dir); return 0; } static int create(struct exfat* ef, const char* path, uint16_t attrib) { struct exfat_node* dir; struct exfat_node* existing; cluster_t cluster = EXFAT_CLUSTER_BAD; off_t offset = -1; le16_t name[EXFAT_NAME_MAX + 1]; int rc; rc = exfat_split(ef, &dir, &existing, name, path); if (rc != 0) return rc; if (existing != NULL) { exfat_put_node(ef, existing); exfat_put_node(ef, dir); return -EEXIST; } rc = find_slot(ef, dir, &cluster, &offset, 2 + DIV_ROUND_UP(utf16_length(name), EXFAT_ENAME_MAX)); if (rc != 0) { exfat_put_node(ef, dir); return rc; } rc = write_entry(ef, dir, name, cluster, offset, attrib); exfat_put_node(ef, dir); return rc; } int exfat_mknod(struct exfat* ef, const char* path) { return create(ef, path, EXFAT_ATTRIB_ARCH); } int exfat_mkdir(struct exfat* ef, const char* path) { int rc; struct exfat_node* node; rc = create(ef, path, EXFAT_ATTRIB_ARCH | EXFAT_ATTRIB_DIR); if (rc != 0) return rc; rc = exfat_lookup(ef, &node, path); if (rc != 0) return 0; /* directories always have at least one cluster */ rc = exfat_truncate(ef, node, CLUSTER_SIZE(*ef->sb)); if (rc != 0) { delete(ef, node); exfat_put_node(ef, node); return rc; } exfat_put_node(ef, node); return 0; } static void rename_entry(struct exfat* ef, struct exfat_node* dir, struct exfat_node* node, const le16_t* name, cluster_t new_cluster, off_t new_offset) { struct exfat_entry_meta1 meta1; struct exfat_entry_meta2 meta2; cluster_t old_cluster = node->entry_cluster; off_t old_offset = node->entry_offset; const size_t name_length = utf16_length(name); const int name_entries = DIV_ROUND_UP(name_length, EXFAT_ENAME_MAX); int i; exfat_pread(ef->dev, &meta1, sizeof(meta1), co2o(ef, old_cluster, old_offset)); next_entry(ef, node->parent, &old_cluster, &old_offset); exfat_pread(ef->dev, &meta2, sizeof(meta2), co2o(ef, old_cluster, old_offset)); meta1.continuations = 1 + name_entries; meta2.name_hash = exfat_calc_name_hash(ef, name); meta2.name_length = name_length; meta1.checksum = exfat_calc_checksum(&meta1, &meta2, name); erase_entry(ef, node); node->entry_cluster = new_cluster; node->entry_offset = new_offset; exfat_pwrite(ef->dev, &meta1, sizeof(meta1), co2o(ef, new_cluster, new_offset)); next_entry(ef, dir, &new_cluster, &new_offset); exfat_pwrite(ef->dev, &meta2, sizeof(meta2), co2o(ef, new_cluster, new_offset)); for (i = 0; i < name_entries; i++) { struct exfat_entry_name name_entry = {EXFAT_ENTRY_FILE_NAME, 0}; memcpy(name_entry.name, name + i * EXFAT_ENAME_MAX, EXFAT_ENAME_MAX * sizeof(le16_t)); next_entry(ef, dir, &new_cluster, &new_offset); exfat_pwrite(ef->dev, &name_entry, sizeof(name_entry), co2o(ef, new_cluster, new_offset)); } memcpy(node->name, name, (EXFAT_NAME_MAX + 1) * sizeof(le16_t)); tree_detach(node); tree_attach(dir, node); } int exfat_rename(struct exfat* ef, const char* old_path, const char* new_path) { struct exfat_node* node; struct exfat_node* existing; struct exfat_node* dir; cluster_t cluster = EXFAT_CLUSTER_BAD; off_t offset = -1; le16_t name[EXFAT_NAME_MAX + 1]; int rc; rc = exfat_lookup(ef, &node, old_path); if (rc != 0) return rc; rc = exfat_split(ef, &dir, &existing, name, new_path); if (rc != 0) { exfat_put_node(ef, node); return rc; } if (existing != NULL) { if (existing->flags & EXFAT_ATTRIB_DIR) { if (node->flags & EXFAT_ATTRIB_DIR) rc = exfat_rmdir(ef, existing); else rc = -ENOTDIR; } else { if (!(node->flags & EXFAT_ATTRIB_DIR)) rc = exfat_unlink(ef, existing); else rc = -EISDIR; } exfat_put_node(ef, existing); if (rc != 0) { exfat_put_node(ef, dir); exfat_put_node(ef, node); return rc; } } rc = find_slot(ef, dir, &cluster, &offset, 2 + DIV_ROUND_UP(utf16_length(name), EXFAT_ENAME_MAX)); if (rc != 0) { exfat_put_node(ef, dir); exfat_put_node(ef, node); return rc; } rename_entry(ef, dir, node, name, cluster, offset); exfat_put_node(ef, dir); exfat_put_node(ef, node); return 0; } void exfat_utimes(struct exfat_node* node, const struct timespec tv[2]) { node->atime = tv[0].tv_sec; node->mtime = tv[1].tv_sec; node->flags |= EXFAT_ATTRIB_DIRTY; } void exfat_update_atime(struct exfat_node* node) { node->atime = time(NULL); node->flags |= EXFAT_ATTRIB_DIRTY; } void exfat_update_mtime(struct exfat_node* node) { node->mtime = time(NULL); node->flags |= EXFAT_ATTRIB_DIRTY; } const char* exfat_get_label(struct exfat* ef) { return ef->label; } static int find_label(struct exfat* ef, cluster_t* cluster, off_t* offset) { struct iterator it; int rc; rc = opendir(ef, ef->root, &it); if (rc != 0) return rc; for (;;) { if (it.offset >= ef->root->size) { closedir(&it); return -ENOENT; } if (get_entry_ptr(ef, &it)->type == EXFAT_ENTRY_LABEL) { *cluster = it.cluster; *offset = it.offset; closedir(&it); return 0; } if (fetch_next_entry(ef, ef->root, &it) != 0) { closedir(&it); return -EIO; } } } int exfat_set_label(struct exfat* ef, const char* label) { le16_t label_utf16[EXFAT_ENAME_MAX + 1]; int rc; cluster_t cluster; off_t offset; struct exfat_entry_label entry; memset(label_utf16, 0, sizeof(label_utf16)); rc = utf8_to_utf16(label_utf16, label, EXFAT_ENAME_MAX, strlen(label)); if (rc != 0) return rc; rc = find_label(ef, &cluster, &offset); if (rc == -ENOENT) rc = find_slot(ef, ef->root, &cluster, &offset, 1); if (rc != 0) return rc; entry.type = EXFAT_ENTRY_LABEL; entry.length = utf16_length(label_utf16); memcpy(entry.name, label_utf16, sizeof(entry.name)); if (entry.length == 0) entry.type ^= EXFAT_ENTRY_VALID; exfat_pwrite(ef->dev, &entry, sizeof(struct exfat_entry_label), co2o(ef, cluster, offset)); return 0; } partclone-0.2.51/src/exfat/time.c000066400000000000000000000113631200565264100165730ustar00rootroot00000000000000/* time.c (03.02.12) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" /* timezone offset from UTC in seconds; positive for western timezones, negative for eastern ones */ static long exfat_timezone; #define SEC_IN_MIN 60ll #define SEC_IN_HOUR (60 * SEC_IN_MIN) #define SEC_IN_DAY (24 * SEC_IN_HOUR) #define SEC_IN_YEAR (365 * SEC_IN_DAY) /* not leap year */ /* Unix epoch started at 0:00:00 UTC 1 January 1970 */ #define UNIX_EPOCH_YEAR 1970 /* exFAT epoch started at 0:00:00 UTC 1 January 1980 */ #define EXFAT_EPOCH_YEAR 1980 /* number of years from Unix epoch to exFAT epoch */ #define EPOCH_DIFF_YEAR (EXFAT_EPOCH_YEAR - UNIX_EPOCH_YEAR) /* number of days from Unix epoch to exFAT epoch (considering leap days) */ #define EPOCH_DIFF_DAYS (EPOCH_DIFF_YEAR * 365 + EPOCH_DIFF_YEAR / 4) /* number of seconds from Unix epoch to exFAT epoch (considering leap days) */ #define EPOCH_DIFF_SEC (EPOCH_DIFF_DAYS * SEC_IN_DAY) /* number of leap years passed from exFAT epoch to the specified year (excluding the specified year itself) */ #define LEAP_YEARS(year) ((EXFAT_EPOCH_YEAR + (year) - 1) / 4 \ - (EXFAT_EPOCH_YEAR - 1) / 4) /* checks whether the specified year is leap */ #define IS_LEAP_YEAR(year) ((EXFAT_EPOCH_YEAR + (year)) % 4 == 0) static const time_t days_in_year[] = { /* Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec */ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; time_t exfat_exfat2unix(le16_t date, le16_t time, uint8_t centisec) { time_t unix_time = EPOCH_DIFF_SEC; uint16_t ndate = le16_to_cpu(date); uint16_t ntime = le16_to_cpu(time); uint16_t day = ndate & 0x1f; /* 5 bits, 1-31 */ uint16_t month = ndate >> 5 & 0xf; /* 4 bits, 1-12 */ uint16_t year = ndate >> 9; /* 7 bits, 1-127 (+1980) */ uint16_t twosec = ntime & 0x1f; /* 5 bits, 0-29 (2 sec granularity) */ uint16_t min = ntime >> 5 & 0x3f; /* 6 bits, 0-59 */ uint16_t hour = ntime >> 11; /* 5 bits, 0-23 */ if (day == 0 || month == 0 || month > 12) { exfat_error("bad date %u-%02hu-%02hu", year + EXFAT_EPOCH_YEAR, month, day); return 0; } if (hour > 23 || min > 59 || twosec > 29) { exfat_error("bad time %hu:%02hu:%02u", hour, min, twosec * 2); return 0; } if (centisec > 199) { exfat_error("bad centiseconds count %hhu", centisec); return 0; } /* every 4th year between 1904 and 2096 is leap */ unix_time += year * SEC_IN_YEAR + LEAP_YEARS(year) * SEC_IN_DAY; unix_time += days_in_year[month] * SEC_IN_DAY; /* if it's leap year and February has passed we should add 1 day */ if ((EXFAT_EPOCH_YEAR + year) % 4 == 0 && month > 2) unix_time += SEC_IN_DAY; unix_time += (day - 1) * SEC_IN_DAY; unix_time += hour * SEC_IN_HOUR; unix_time += min * SEC_IN_MIN; /* exFAT represents time with 2 sec granularity */ unix_time += twosec * 2; unix_time += centisec / 100; /* exFAT stores timestamps in local time, so we correct it to UTC */ unix_time += exfat_timezone; return unix_time; } void exfat_unix2exfat(time_t unix_time, le16_t* date, le16_t* time, uint8_t* centisec) { time_t shift = EPOCH_DIFF_SEC + exfat_timezone; uint16_t day, month, year; uint16_t twosec, min, hour; int days; int i; /* time before exFAT epoch cannot be represented */ if (unix_time < shift) unix_time = shift; unix_time -= shift; days = unix_time / SEC_IN_DAY; year = (4 * days) / (4 * 365 + 1); days -= year * 365 + LEAP_YEARS(year); month = 0; for (i = 1; i <= 12; i++) { int leap_day = (IS_LEAP_YEAR(year) && i == 2); int leap_sub = (IS_LEAP_YEAR(year) && i >= 3); if (i == 12 || days - leap_sub < days_in_year[i + 1] + leap_day) { month = i; days -= days_in_year[i] + leap_sub; break; } } day = days + 1; hour = (unix_time % SEC_IN_DAY) / SEC_IN_HOUR; min = (unix_time % SEC_IN_HOUR) / SEC_IN_MIN; twosec = (unix_time % SEC_IN_MIN) / 2; *date = cpu_to_le16(day | (month << 5) | (year << 9)); *time = cpu_to_le16(twosec | (min << 5) | (hour << 11)); if (centisec) *centisec = (unix_time % 2) * 100; } void exfat_tzset(void) { time_t now; tzset(); now = time(NULL); exfat_timezone = mktime(gmtime(&now)) - now; } partclone-0.2.51/src/exfat/utf.c000066400000000000000000000125151200565264100164330ustar00rootroot00000000000000/* utf.c (13.09.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include static char* wchar_to_utf8(char* output, wchar_t wc, size_t outsize) { if (wc <= 0x7f) { if (outsize < 1) return NULL; *output++ = (char) wc; } else if (wc <= 0x7ff) { if (outsize < 2) return NULL; *output++ = 0xc0 | (wc >> 6); *output++ = 0x80 | (wc & 0x3f); } else if (wc <= 0xffff) { if (outsize < 3) return NULL; *output++ = 0xe0 | (wc >> 12); *output++ = 0x80 | ((wc >> 6) & 0x3f); *output++ = 0x80 | (wc & 0x3f); } else if (wc <= 0x1fffff) { if (outsize < 4) return NULL; *output++ = 0xf0 | (wc >> 18); *output++ = 0x80 | ((wc >> 12) & 0x3f); *output++ = 0x80 | ((wc >> 6) & 0x3f); *output++ = 0x80 | (wc & 0x3f); } else if (wc <= 0x3ffffff) { if (outsize < 5) return NULL; *output++ = 0xf8 | (wc >> 24); *output++ = 0x80 | ((wc >> 18) & 0x3f); *output++ = 0x80 | ((wc >> 12) & 0x3f); *output++ = 0x80 | ((wc >> 6) & 0x3f); *output++ = 0x80 | (wc & 0x3f); } else if (wc <= 0x7fffffff) { if (outsize < 6) return NULL; *output++ = 0xfc | (wc >> 30); *output++ = 0x80 | ((wc >> 24) & 0x3f); *output++ = 0x80 | ((wc >> 18) & 0x3f); *output++ = 0x80 | ((wc >> 12) & 0x3f); *output++ = 0x80 | ((wc >> 6) & 0x3f); *output++ = 0x80 | (wc & 0x3f); } else return NULL; return output; } static const le16_t* utf16_to_wchar(const le16_t* input, wchar_t* wc, size_t insize) { if ((le16_to_cpu(input[0]) & 0xfc00) == 0xd800) { if (insize < 2 || (le16_to_cpu(input[1]) & 0xfc00) != 0xdc00) return NULL; *wc = ((wchar_t) (le16_to_cpu(input[0]) & 0x3ff) << 10); *wc |= (le16_to_cpu(input[1]) & 0x3ff); return input + 2; } else { *wc = le16_to_cpu(*input); return input + 1; } } int utf16_to_utf8(char* output, const le16_t* input, size_t outsize, size_t insize) { const le16_t* inp = input; char* outp = output; wchar_t wc; while (inp - input < insize && le16_to_cpu(*inp)) { inp = utf16_to_wchar(inp, &wc, insize - (inp - input)); if (inp == NULL) { exfat_error("illegal UTF-16 sequence"); return -EILSEQ; } outp = wchar_to_utf8(outp, wc, outsize - (outp - output)); if (outp == NULL) { exfat_error("name is too long"); return -ENAMETOOLONG; } } *outp = '\0'; return 0; } static const char* utf8_to_wchar(const char* input, wchar_t* wc, size_t insize) { if ((input[0] & 0x80) == 0 && insize >= 1) { *wc = (wchar_t) input[0]; return input + 1; } if ((input[0] & 0xe0) == 0xc0 && insize >= 2) { *wc = (((wchar_t) input[0] & 0x1f) << 6) | ((wchar_t) input[1] & 0x3f); return input + 2; } if ((input[0] & 0xf0) == 0xe0 && insize >= 3) { *wc = (((wchar_t) input[0] & 0x0f) << 12) | (((wchar_t) input[1] & 0x3f) << 6) | ((wchar_t) input[2] & 0x3f); return input + 3; } if ((input[0] & 0xf8) == 0xf0 && insize >= 4) { *wc = (((wchar_t) input[0] & 0x07) << 18) | (((wchar_t) input[1] & 0x3f) << 12) | (((wchar_t) input[2] & 0x3f) << 6) | ((wchar_t) input[3] & 0x3f); return input + 4; } if ((input[0] & 0xfc) == 0xf8 && insize >= 5) { *wc = (((wchar_t) input[0] & 0x03) << 24) | (((wchar_t) input[1] & 0x3f) << 18) | (((wchar_t) input[2] & 0x3f) << 12) | (((wchar_t) input[3] & 0x3f) << 6) | ((wchar_t) input[4] & 0x3f); return input + 5; } if ((input[0] & 0xfe) == 0xfc && insize >= 6) { *wc = (((wchar_t) input[0] & 0x01) << 30) | (((wchar_t) input[1] & 0x3f) << 24) | (((wchar_t) input[2] & 0x3f) << 18) | (((wchar_t) input[3] & 0x3f) << 12) | (((wchar_t) input[4] & 0x3f) << 6) | ((wchar_t) input[5] & 0x3f); return input + 6; } return NULL; } static le16_t* wchar_to_utf16(le16_t* output, wchar_t wc, size_t outsize) { if (wc <= 0xffff) /* if character is from BMP */ { if (outsize == 0) return NULL; output[0] = cpu_to_le16(wc); return output + 1; } if (outsize < 2) return NULL; output[0] = cpu_to_le16(0xd800 | ((wc >> 10) & 0x3ff)); output[1] = cpu_to_le16(0xdc00 | (wc & 0x3ff)); return output + 2; } int utf8_to_utf16(le16_t* output, const char* input, size_t outsize, size_t insize) { const char* inp = input; le16_t* outp = output; wchar_t wc; while (inp - input < insize && *inp) { inp = utf8_to_wchar(inp, &wc, insize - (inp - input)); if (inp == NULL) { exfat_error("illegal UTF-8 sequence"); return -EILSEQ; } outp = wchar_to_utf16(outp, wc, outsize - (outp - output)); if (outp == NULL) { exfat_error("name is too long"); return -ENAMETOOLONG; } } *outp = cpu_to_le16(0); return 0; } size_t utf16_length(const le16_t* str) { size_t i = 0; while (le16_to_cpu(str[i])) i++; return i; } partclone-0.2.51/src/exfat/utils.c000066400000000000000000000120311200565264100167660ustar00rootroot00000000000000/* utils.c (04.09.09) exFAT file system implementation library. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "exfat.h" #include #include #include void exfat_stat(const struct exfat* ef, const struct exfat_node* node, struct stat* stbuf) { memset(stbuf, 0, sizeof(struct stat)); if (node->flags & EXFAT_ATTRIB_DIR) stbuf->st_mode = S_IFDIR | (0777 & ~ef->dmask); else stbuf->st_mode = S_IFREG | (0777 & ~ef->fmask); stbuf->st_nlink = 1; stbuf->st_uid = ef->uid; stbuf->st_gid = ef->gid; stbuf->st_size = node->size; stbuf->st_blocks = DIV_ROUND_UP(node->size, CLUSTER_SIZE(*ef->sb)) * CLUSTER_SIZE(*ef->sb) / 512; stbuf->st_mtime = node->mtime; stbuf->st_atime = node->atime; /* set ctime to mtime to ensure we don't break programs that rely on ctime (e.g. rsync) */ stbuf->st_ctime = node->mtime; } void exfat_get_name(const struct exfat_node* node, char* buffer, size_t n) { if (utf16_to_utf8(buffer, node->name, n, EXFAT_NAME_MAX) != 0) exfat_bug("failed to convert name to UTF-8"); } uint16_t exfat_start_checksum(const struct exfat_entry_meta1* entry) { uint16_t sum = 0; int i; for (i = 0; i < sizeof(struct exfat_entry); i++) if (i != 2 && i != 3) /* skip checksum field itself */ sum = ((sum << 15) | (sum >> 1)) + ((const uint8_t*) entry)[i]; return sum; } uint16_t exfat_add_checksum(const void* entry, uint16_t sum) { int i; for (i = 0; i < sizeof(struct exfat_entry); i++) sum = ((sum << 15) | (sum >> 1)) + ((const uint8_t*) entry)[i]; return sum; } le16_t exfat_calc_checksum(const struct exfat_entry_meta1* meta1, const struct exfat_entry_meta2* meta2, const le16_t* name) { uint16_t checksum; const int name_entries = DIV_ROUND_UP(utf16_length(name), EXFAT_ENAME_MAX); int i; checksum = exfat_start_checksum(meta1); checksum = exfat_add_checksum(meta2, checksum); for (i = 0; i < name_entries; i++) { struct exfat_entry_name name_entry = {EXFAT_ENTRY_FILE_NAME, 0}; memcpy(name_entry.name, name + i * EXFAT_ENAME_MAX, EXFAT_ENAME_MAX * sizeof(le16_t)); checksum = exfat_add_checksum(&name_entry, checksum); } return cpu_to_le16(checksum); } uint32_t exfat_vbr_start_checksum(const void* sector, size_t size) { size_t i; uint32_t sum = 0; for (i = 0; i < size; i++) /* skip volume_state and allocated_percent fields */ if (i != 0x6a && i != 0x6b && i != 0x70) sum = ((sum << 31) | (sum >> 1)) + ((const uint8_t*) sector)[i]; return sum; } uint32_t exfat_vbr_add_checksum(const void* sector, size_t size, uint32_t sum) { size_t i; for (i = 0; i < size; i++) sum = ((sum << 31) | (sum >> 1)) + ((const uint8_t*) sector)[i]; return sum; } le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name) { size_t i; size_t length = utf16_length(name); uint16_t hash = 0; for (i = 0; i < length; i++) { uint16_t c = le16_to_cpu(name[i]); /* convert to upper case */ if (c < ef->upcase_chars) c = le16_to_cpu(ef->upcase[c]); hash = ((hash << 15) | (hash >> 1)) + (c & 0xff); hash = ((hash << 15) | (hash >> 1)) + (c >> 8); } return cpu_to_le16(hash); } void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb) { size_t i; const char* units[] = {"bytes", "KB", "MB", "GB", "TB", "PB"}; uint64_t divisor = 1; uint64_t temp = 0; for (i = 0; i < sizeof(units) / sizeof(units[0]) - 1; i++, divisor *= 1024) { temp = (value + divisor / 2) / divisor; if (temp == 0) break; if (temp / 1024 * 1024 == temp) continue; if (temp < 10240) break; } hb->value = temp; hb->unit = units[i]; } void exfat_print_info(const struct exfat_super_block* sb, uint32_t free_clusters) { struct exfat_human_bytes hb; off_t total_space = le64_to_cpu(sb->sector_count) * SECTOR_SIZE(*sb); off_t avail_space = (off_t) free_clusters * CLUSTER_SIZE(*sb); printf("File system version %hhu.%hhu\n", sb->version.major, sb->version.minor); exfat_humanize_bytes(SECTOR_SIZE(*sb), &hb); printf("Sector size %10"PRIu64" %s\n", hb.value, hb.unit); exfat_humanize_bytes(CLUSTER_SIZE(*sb), &hb); printf("Cluster size %10"PRIu64" %s\n", hb.value, hb.unit); exfat_humanize_bytes(total_space, &hb); printf("Volume size %10"PRIu64" %s\n", hb.value, hb.unit); exfat_humanize_bytes(total_space - avail_space, &hb); printf("Used space %10"PRIu64" %s\n", hb.value, hb.unit); exfat_humanize_bytes(avail_space, &hb); printf("Available space %10"PRIu64" %s\n", hb.value, hb.unit); } partclone-0.2.51/src/exfat/version.h000066400000000000000000000016041200565264100173240ustar00rootroot00000000000000/* version.h (12.06.10) Version constants. Copyright (C) 2009, 2010 Andrew Nayenko This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef VERSION_H_INCLUDED #define VERSION_H_INCLUDED #define EXFAT_VERSION_MAJOR 0 #define EXFAT_VERSION_MINOR 9 #define EXFAT_VERSION_PATCH 7 #endif /* ifndef VERSION_H_INCLUDED */ partclone-0.2.51/src/exfatclone.c000066400000000000000000000056101200565264100166540ustar00rootroot00000000000000/** * exfatclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read exfat super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include "exfat/exfat.h" #include "partclone.h" #include "exfatclone.h" #include "progress.h" #include "fs_common.h" #define EXFAT_SECTOR_SIZE(sb) (1 << (sb).sector_bits) char *EXECNAME = "partclone.exfat"; extern fs_cmd_opt fs_opt; struct exfat ef; /// open device static void fs_open(char* device){ log_mesg(2, 0, 0, fs_opt.debug, "%s: exfat_mount\n", __FILE__); if (exfat_mount(&ef, device, "ro") != 0) log_mesg(0, 1, 1, fs_opt.debug, "%s: File system exfat open fail\n", __FILE__); log_mesg(2, 0, 0, fs_opt.debug, "%s: exfat_mount done\n", __FILE__); } /// close device static void fs_close(){ log_mesg(2, 0, 0, fs_opt.debug, "%s: exfat_umount\n", __FILE__); exfat_unmount(&ef); log_mesg(2, 0, 0, fs_opt.debug, "%s: exfat_umount done\n", __FILE__); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { struct exfat_super_block* sb; uint64_t free_sectors, free_clusters; off_t a = 0, b = 0; off_t block = 0;; int start = 0; int bit_size = 1; fs_open(device); /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); while (exfat_find_used_sectors(&ef, &a, &b) == 0){ printf("block %lli %lli \n", a, b); for (block = a; block <= b; block++){ pc_set_bit((uint64_t)block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: used block %lli \n", __FILE__, block); /// update progress update_pui(&prog, block, block, 0); } } fs_close(); /// update progress update_pui(&prog, 1, 1, 1); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { struct exfat_super_block* sb; uint64_t free_sectors, free_clusters; fs_open(device); free_clusters = exfat_count_free_clusters(&ef); free_sectors = (uint64_t) free_clusters << ef.sb->spc_bits; sb = ef.sb; strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, exfat_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = EXFAT_SECTOR_SIZE(*sb); image_hdr->totalblock = le64_to_cpu(sb->sector_count); image_hdr->usedblocks = (le64_to_cpu(sb->sector_count) - free_sectors); image_hdr->device_size = (image_hdr->totalblock*image_hdr->block_size); fs_close(); } partclone-0.2.51/src/exfatclone.h000066400000000000000000000013521200565264100166600ustar00rootroot00000000000000/** * reiserfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiserfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/extfsclone.c000066400000000000000000000174051200565264100167030ustar00rootroot00000000000000/** * extfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read ext2/3 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #define in_use(m, x) (ext2fs_test_bit ((x), (m))) #include "partclone.h" #include "extfsclone.h" #include "progress.h" #include "fs_common.h" ext2_filsys fs; char *EXECNAME = "partclone.extfs"; extern fs_cmd_opt fs_opt; /// open device static void fs_open(char* device){ errcode_t retval; int use_superblock = 0; int use_blocksize = 0; int flags; flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES; if (use_superblock && !use_blocksize) { for (use_blocksize = EXT2_MIN_BLOCK_SIZE; use_blocksize <= EXT2_MAX_BLOCK_SIZE; use_blocksize *= 2) { retval = ext2fs_open (device, flags, use_superblock, use_blocksize, unix_io_manager, &fs); if (!retval) break; } } else retval = ext2fs_open (device, flags, use_superblock, use_blocksize, unix_io_manager, &fs); if (retval) log_mesg(0, 1, 1, fs_opt.debug, "%s: Couldn't find valid filesystem superblock.\n", __FILE__); ext2fs_mark_valid(fs); if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__); } else { if ((fs->super->s_state & EXT2_ERROR_FS) || !ext2fs_test_valid(fs)) log_mesg(0, 1, 1, fs_opt.debug, "%s: FS contains a file system with errors\n", __FILE__); else if ((fs->super->s_state & EXT2_VALID_FS) == 0) log_mesg(0, 1, 1, fs_opt.debug, "%s: FS was not cleanly unmounted\n", __FILE__); else if ((fs->super->s_max_mnt_count > 0) && (fs->super->s_mnt_count >= (unsigned) fs->super->s_max_mnt_count)) { log_mesg(0, 1, 1, fs_opt.debug, "%s: FS has been mounted %u times without being checked\n", __FILE__, fs->super->s_mnt_count); } } } /// close device static void fs_close(){ ext2fs_close(fs); } /// get block size from super block static int block_size(){ return EXT2_BLOCK_SIZE(fs->super); } /// get device size static unsigned long long device_size(char* device){ int size; unsigned long long dev_size; ext2fs_get_device_size(device, EXT2_BLOCK_SIZE(fs->super), &size); dev_size = (unsigned long long)(size * EXT2_BLOCK_SIZE(fs->super)); return dev_size; } /// get total block from super block static unsigned long long block_count(){ return (unsigned long long)fs->super->s_blocks_count; } /// get used blocks ( total - free ) from super block static unsigned long long get_used_blocks(){ return (unsigned long long)(fs->super->s_blocks_count - fs->super->s_free_blocks_count); } /// readbitmap - cread and heck bitmap, reference dumpe2fs extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui){ errcode_t retval; unsigned long group; unsigned long long current_block, block; unsigned long long free, gfree; char *block_bitmap=NULL; int block_nbytes; unsigned long long blk_itr; int bg_flags = 0; int start = 0; int bit_size = 1; int B_UN_INIT = 0; int ext4_gfree_mismatch = 0; log_mesg(2, 0, 0, fs_opt.debug, "%s: readbitmap %i\n", __FILE__, bitmap); fs_open(device); retval = ext2fs_read_bitmaps(fs); /// open extfs bitmap if (retval) log_mesg(0, 1, 1, fs_opt.debug, "%s: Couldn't find valid filesystem bitmap.\n", __FILE__); block_nbytes = EXT2_BLOCKS_PER_GROUP(fs->super) / 8; if (fs->block_map) block_bitmap = malloc(block_nbytes); /// initial image bitmap as 1 (all block are used) memset(bitmap, 0xFF, sizeof(unsigned long)*LONGS(image_hdr.totalblock)); free = 0; current_block = 0; blk_itr = fs->super->s_first_data_block; /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); /// each group for (group = 0; group < fs->group_desc_count; group++) { gfree = 0; B_UN_INIT = 0; if (block_bitmap) { ext2fs_get_block_bitmap_range(fs->block_map, blk_itr, block_nbytes << 3, block_bitmap); if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM){ #ifdef EXTFS_1_41 bg_flags = fs->group_desc[group].bg_flags; #else bg_flags = ext2fs_bg_flags(fs, group); #endif if (bg_flags&EXT2_BG_BLOCK_UNINIT){ log_mesg(1, 0, 0, fs_opt.debug, "%s: BLOCK_UNINIT for group %i\n", __FILE__, group); B_UN_INIT = 1; } else { log_mesg(2, 0, 0, fs_opt.debug, "%s: BLOCK_INIT for group %i\n", __FILE__, group); } } /// each block in group for (block = 0; ((block < fs->super->s_blocks_per_group) && (current_block < (image_hdr.totalblock-1))); block++) { current_block = block + blk_itr; /// check block is used or not if ((!in_use (block_bitmap, block)) || (B_UN_INIT)) { free++; gfree++; pc_clear_bit(current_block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: free block %llu at group %i init %i\n", __FILE__, current_block, group, (int)B_UN_INIT); } else { pc_set_bit(current_block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: used block %llu at group %i\n", __FILE__, current_block, group); } /// update progress update_pui(&prog, current_block, current_block, 0);//keep update } blk_itr += fs->super->s_blocks_per_group; } /// check free blocks in group #ifdef EXTFS_1_41 if (gfree != fs->group_desc[group].bg_free_blocks_count){ #else if (gfree != ext2fs_bg_free_blocks_count(fs, group)){ #endif if (!B_UN_INIT) log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap error at %i group.\n", __FILE__, group); else ext4_gfree_mismatch = 1; } } /// check all free blocks in partition if (free != fs->super->s_free_blocks_count) if ((fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) && (ext4_gfree_mismatch)) log_mesg(1, 0, 0, fs_opt.debug, "%s: EXT4 bitmap metadata mismatch\n", __FILE__); else log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap free count err, free:%i\n", __FILE__, free); fs_close(); /// update progress update_pui(&prog, 1, 1, 1);//finish } /// get extfs type static int test_extfs_type(char* device){ int ext2 = 1; int ext3 = 2; int ext4 = 3; fs_open(device); if(fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM){ log_mesg(1, 0, 0, fs_opt.debug, "%s: test feature as EXT4\n", __FILE__); return ext4; } else if (fs->super->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL){ log_mesg(1, 0, 0, fs_opt.debug, "%s: test feature as EXT3\n", __FILE__); return ext3; } else { log_mesg(1, 0, 0, fs_opt.debug, "%s: test feature as EXT2\n", __FILE__); return ext2; } fs_close(); return 0; } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { int fs_type = 0; fs_type = test_extfs_type(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, extfs_MAGIC, FS_MAGIC_SIZE); fs_open(device); image_hdr->block_size = (int)block_size(); image_hdr->totalblock = (unsigned long long)block_count(); image_hdr->usedblocks = (unsigned long long)get_used_blocks(); //image_hdr->device_size = (unsigned long long)device_size(device); image_hdr->device_size = (unsigned long long)(image_hdr->block_size * image_hdr->totalblock); fs_close(); } partclone-0.2.51/src/extfsclone.h000066400000000000000000000021731200565264100167040ustar00rootroot00000000000000/** * extfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read ext2/3 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// get block size from super block static int block_size(); /// get device size static unsigned long long device_size(char* device); /// get total block from super block static unsigned long long block_count(); /// get used blocks ( total - free ) from super block static unsigned long long get_used_blocks(); /// readbitmap - cread and heck bitmap, reference dumpe2fs extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// get extfs type static int test_extfs_type(char* device); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/fatclone.c000066400000000000000000000400551200565264100163210ustar00rootroot00000000000000/** fatclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read FAT12/16/32 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include "partclone.h" #include "fatclone.h" #include "progress.h" #include "fs_common.h" struct FatBootSector fat_sb; struct FatFsInfo fatfs_info; int ret; int FS; char *fat_type = "FATXX"; char *EXECNAME = "partclone.fat"; extern fs_cmd_opt fs_opt; /// get fet type static void get_fat_type(){ /// fix, 1. make sure fat_sb; 2. the method shoud be check again if (fat_sb.u.fat16.ext_signature == 0x29){ if (fat_sb.u.fat16.fat_name[4] == '6'){ FS = FAT_16; fat_type = "FAT16"; log_mesg(2, 0, 0, fs_opt.debug, "%s: FAT Type : FAT 16\n", __FILE__); } else if (fat_sb.u.fat16.fat_name[4] == '2'){ FS = FAT_12; fat_type = "FAT12"; log_mesg(2, 0, 0, fs_opt.debug, "%s: FAT Type : FAT 12\n", __FILE__); } else { log_mesg(2, 1, 1, fs_opt.debug, "%s: FAT Type : unknow\n" __FILE__); } } else if (fat_sb.u.fat32.fat_name[4] == '2'){ FS = FAT_32; fat_type = "FAT32"; log_mesg(2, 0, 0, fs_opt.debug, "%s: FAT Type : FAT 32\n", __FILE__); } else { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unknown fat type!!\n", __FILE__); } log_mesg(2, 0, 0, fs_opt.debug, "%s: FS = %i\n", __FILE__, FS); } /// return total sectors unsigned long long get_total_sector() { unsigned long long total_sector = 0; /// get fat sectors if (fat_sb.sectors != 0) total_sector = (unsigned long long)fat_sb.sectors; else total_sector = (unsigned long long)fat_sb.sector_count; return total_sector; } ///return sec_per_fat unsigned long long get_sec_per_fat() { unsigned long long sec_per_fat = 0; /// get fat length if(fat_sb.fat_length != 0) sec_per_fat = fat_sb.fat_length; else sec_per_fat = fat_sb.u.fat32.fat_length; return sec_per_fat; } ///return root sec unsigned long long get_root_sec() { unsigned long long root_sec = 0; root_sec = ((fat_sb.dir_entries * 32) + fat_sb.sector_size - 1) / fat_sb.sector_size; return root_sec; } /// return cluster count unsigned long long get_cluster_count() { unsigned long long data_sec = 0; unsigned long long cluster_count = 0; unsigned long long total_sector = get_total_sector(); unsigned long long root_sec = get_root_sec(); unsigned long long sec_per_fat = get_sec_per_fat(); data_sec = total_sector - ( fat_sb.reserved + (fat_sb.fats * sec_per_fat) + root_sec); cluster_count = data_sec / fat_sb.cluster_size; return cluster_count; } /// check fat status //return - 0 Filesystem is in valid state. //return - 1 Filesystem isn't in valid state. //return - 2 other error. extern int check_fat_status(){ int rd = 0; uint16_t Fat16_Entry; uint32_t Fat32_Entry; int fs_error = 2; int fs_good = 0; int fs_bad = 1; /// fix. 1.check ret; if (FS == FAT_16){ /// FAT[0] contains BPB_Media code rd = read(ret, &Fat16_Entry, sizeof(Fat16_Entry)); log_mesg(2, 0, 0, fs_opt.debug, "%s: Media %x\n", __FILE__, Fat16_Entry); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat16_Entry error\n", __FILE__); /// FAT[1] is set for FAT16/FAT32 for dirty/error volume flag rd = read(ret, &Fat16_Entry, sizeof(Fat16_Entry)); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat16_Entry error\n", __FILE__); if (Fat16_Entry & 0x8000) log_mesg(2, 0, 0, fs_opt.debug, "%s: Volume clean!\n", __FILE__); else return fs_bad; if (Fat16_Entry & 0x4000) log_mesg(2, 0, 0, fs_opt.debug, "%s: I/O correct!\n", __FILE__); else return fs_error; } else if (FS == FAT_32) { /// FAT[0] contains BPB_Media rd = read(ret, &Fat32_Entry, sizeof(Fat32_Entry)); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat32_Entry error\n", __FILE__); /// FAT[1] is set for FAT16/FAT32 for dirty volume flag rd = read(ret, &Fat32_Entry, sizeof(Fat32_Entry)); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat32_Entry error\n", __FILE__); if (Fat32_Entry & 0x08000000) log_mesg(2, 0, 0, fs_opt.debug, "%s: Volume clean!\n", __FILE__); else return fs_bad; if (Fat32_Entry & 0x04000000) log_mesg(2, 0, 0, fs_opt.debug, "%s: I/O correct!\n", __FILE__); else return fs_error; } else if (FS == FAT_12){ /// FAT[0] contains BPB_Media code rd = read(ret, &Fat16_Entry, sizeof(Fat16_Entry)); log_mesg(2, 0, 0, fs_opt.debug, "%s: Media %x\n", __FILE__, Fat16_Entry); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat12_Entry error\n", __FILE__); rd = read(ret, &Fat16_Entry, sizeof(Fat16_Entry)); } else log_mesg(2, 0, 0, fs_opt.debug, "%s: ERR_WRONG_FS\n", __FILE__); return fs_good; } /// mark reserved sectors as used static unsigned long long mark_reserved_sectors(unsigned long* fat_bitmap, unsigned long long block) { unsigned long long i = 0; unsigned long long j = 0; unsigned long long sec_per_fat = 0; unsigned long long root_sec = 0; sec_per_fat = get_sec_per_fat(); root_sec = get_root_sec(); /// A) the reserved sectors are used for (i=0; i < fat_sb.reserved; i++,block++) pc_set_bit(block, fat_bitmap); /// B) the FAT tables are on used sectors for (j=0; j < fat_sb.fats; j++) for (i=0; i < sec_per_fat ; i++,block++) pc_set_bit(block, fat_bitmap); /// C) The rootdirectory is on used sectors if (root_sec > 0) /// no rootdir sectors on FAT32 for (i=0; i < root_sec; i++,block++) pc_set_bit(block, fat_bitmap); return block; } /// open device static void fs_open(char* device) { int r = 0; char *buffer; log_mesg(2, 0, 0, fs_opt.debug, "%s: open device\n", __FILE__); ret = open(device, O_RDONLY); buffer = (char*)malloc(sizeof(FatBootSector)); r = read (ret, buffer, sizeof(FatBootSector)); memcpy(&fat_sb, buffer, sizeof(FatBootSector)); free(buffer); buffer = (char*)malloc(sizeof(FatFsInfo)); r = read(ret, &fatfs_info, sizeof(FatFsInfo)); memcpy(&fatfs_info, buffer, sizeof(FatFsInfo)); free(buffer); log_mesg(2, 0, 0, fs_opt.debug, "%s: open device down\n", __FILE__); } /// close device static void fs_close() { close(ret); } /// check per FAT32 entry unsigned long long check_fat32_entry(unsigned long* fat_bitmap, unsigned long long block, unsigned long long* bfree, unsigned long long* bused, unsigned long long* DamagedClusters) { uint32_t Fat32_Entry = 0; int rd = 0; unsigned long long i = 0, j = 0; rd = read(ret, &Fat32_Entry, sizeof(Fat32_Entry)); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat32_Entry error\n", __FILE__); if (Fat32_Entry == 0x0FFFFFF7) { /// bad FAT32 cluster DamagedClusters++; log_mesg(2, 0, 0, fs_opt.debug, "%s: bad sec %i\n", __FILE__, block); for (j=0; j < fat_sb.cluster_size; j++,block++) pc_clear_bit(block, fat_bitmap); } else if (Fat32_Entry == 0x0000){ /// free bfree++; for (j=0; j < fat_sb.cluster_size; j++,block++) pc_clear_bit(block, fat_bitmap); } else { bused++; for (j=0; j < fat_sb.cluster_size; j++,block++) pc_set_bit(block, fat_bitmap); } return block; } /// check per FAT16 entry unsigned long long check_fat16_entry(unsigned long* fat_bitmap, unsigned long long block, unsigned long long* bfree, unsigned long long* bused, unsigned long long* DamagedClusters) { uint16_t Fat16_Entry = 0; int rd = 0; unsigned long long i = 0, j = 0; rd = read(ret, &Fat16_Entry, sizeof(Fat16_Entry)); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat16_Entry error\n", __FILE__); if (Fat16_Entry == 0xFFF7) { /// bad FAT16 cluster DamagedClusters++; log_mesg(2, 0, 0, fs_opt.debug, "%s: bad sec %i\n", __FILE__, block); for (j=0; j < fat_sb.cluster_size; j++,block++) pc_clear_bit(block, fat_bitmap); } else if (Fat16_Entry == 0x0000){ /// free bfree++; for (j=0; j < fat_sb.cluster_size; j++,block++) pc_clear_bit(block, fat_bitmap); } else { bused++; for (j=0; j < fat_sb.cluster_size; j++,block++) pc_set_bit(block, fat_bitmap); } return block; } /// check per FAT12 entry unsigned long long check_fat12_entry(unsigned long* fat_bitmap, unsigned long long block, unsigned long long* bfree, unsigned long long* bused, unsigned long long* DamagedClusters) { uint16_t Fat16_Entry = 0; uint16_t Fat12_Entry = 0; int rd = 0; unsigned long long i = 0, j = 0; rd = read(ret, &Fat16_Entry, sizeof(Fat16_Entry)); if (rd == -1) log_mesg(2, 0, 0, fs_opt.debug, "%s: read Fat12_Entry error\n", __FILE__); Fat12_Entry = Fat16_Entry>>4; if (Fat12_Entry == 0xFFF7) { /// bad FAT12 cluster DamagedClusters++; log_mesg(2, 0, 0, fs_opt.debug, "%s: bad sec %i\n", __FILE__, block); for (j=0; j < fat_sb.cluster_size; j++,block++) pc_clear_bit(block, fat_bitmap); } else if (Fat12_Entry == 0x0000){ /// free bfree++; for (j=0; j < fat_sb.cluster_size; j++,block++) pc_clear_bit(block, fat_bitmap); } else { bused++; for (j=0; j < fat_sb.cluster_size; j++,block++) pc_set_bit(block, fat_bitmap); } return block; } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { char sig; unsigned long long total_sector = 0; unsigned long long bused = 0; unsigned long long data_sec = 0; unsigned long long sec_per_fat = 0; unsigned long long cluster_count = 0; unsigned long long free_blocks = 0; log_mesg(2, 0, 0, fs_opt.debug, "%s: initial_image start\n", __FILE__); fs_open(device); get_fat_type(); total_sector = get_total_sector(); bused = get_used_block();//so I need calculate by myself. strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, fat_type, FS_MAGIC_SIZE); image_hdr->block_size = (int)fat_sb.sector_size; image_hdr->totalblock = (unsigned long long)total_sector; image_hdr->device_size = (unsigned long long)(total_sector * image_hdr->block_size); image_hdr->usedblocks = (unsigned long long)bused; log_mesg(2, 0, 0, fs_opt.debug, "%s: Block Size:%i\n", __FILE__, image_hdr->block_size); log_mesg(2, 0, 0, fs_opt.debug, "%s: Total Blocks:%i\n", __FILE__, image_hdr->totalblock); log_mesg(2, 0, 0, fs_opt.debug, "%s: Used Blocks:%i\n", __FILE__, image_hdr->usedblocks); log_mesg(2, 0, 0, fs_opt.debug, "%s: Device Size:%i\n", __FILE__, image_hdr->device_size); fs_close(); log_mesg(2, 0, 0, fs_opt.debug, "%s: initial_image down\n", __FILE__); } /// readbitmap - read and check bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { unsigned long long i = 0, j = 0; int rd = 0; int fat_stat = 0; unsigned long long block = 0, bfree = 0, bused = 0, DamagedClusters = 0; unsigned long long cluster_count = 0; unsigned long long total_sector = 0; unsigned long long FatReservedBytes = 0; uint16_t Fat16_Entry = 0; uint32_t Fat32_Entry = 0; extern cmd_opt opt; int start = 0; int bit_size = 1; fs_open(device); total_sector = get_total_sector(); cluster_count = get_cluster_count(); /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, cluster_count, image_hdr.totalblock, BITMAP, bit_size); /// init bitmap memset(bitmap, 0xFF, sizeof(unsigned long)*LONGS(total_sector)); /// A) B) C) block = mark_reserved_sectors(bitmap, block); /// D) The clusters FatReservedBytes = fat_sb.sector_size * fat_sb.reserved; /// The first cluster will be seek lseek(ret, FatReservedBytes, SEEK_SET); /// The second used to check FAT status fat_stat = check_fat_status(); if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__); }else{ if (fat_stat == 1) log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__); else if (fat_stat == 2) log_mesg(0, 1, 1, fs_opt.debug, "%s: I/O error! %X\n", __FILE__); } for (i=0; i < cluster_count; i++){ /// If FAT16 if(FS == FAT_16){ block = check_fat16_entry(bitmap, block, &bfree, &bused, &DamagedClusters); } else if (FS == FAT_32){ /// FAT32 block = check_fat32_entry(bitmap, block, &bfree, &bused, &DamagedClusters); } else if (FS == FAT_12){ /// FAT12 block = check_fat12_entry(bitmap, block, &bfree, &bused, &DamagedClusters); } else log_mesg(2, 0, 0, fs_opt.debug, "%s: error fs\n", __FILE__); /// update progress update_pui(&prog, i, i, 0);//keep update } log_mesg(2, 0, 0, fs_opt.debug, "%s: done\n", __FILE__); fs_close(); /// update progress update_pui(&prog, 1, 1, 1);//finish } /// get_used_block - get FAT used blocks static unsigned long long get_used_block() { unsigned long long i = 0; int rd = 0; int fat_stat = 0; unsigned long long block = 0, bfree = 0, bused = 0, DamagedClusters = 0; unsigned long long cluster_count = 0, total_sector = 0; unsigned long long real_back_block= 0; int FatReservedBytes = 0; unsigned long *fat_bitmap; log_mesg(2, 0, 0, fs_opt.debug, "%s: get_used_block start\n", __FILE__); total_sector = get_total_sector(); cluster_count = get_cluster_count(); fat_bitmap = (unsigned long *)calloc(sizeof(unsigned long), LONGS(total_sector)); if (fat_bitmap == NULL) log_mesg(2, 0, 0, fs_opt.debug, "%s: bitmapalloc error\n", __FILE__); memset(fat_bitmap, 0xFF, sizeof(unsigned long)*LONGS(total_sector)); /// A) B) C) block = mark_reserved_sectors(fat_bitmap, block); /// D) The clusters FatReservedBytes = fat_sb.sector_size * fat_sb.reserved; /// The first fat will be seek lseek(ret, FatReservedBytes, SEEK_SET); /// The second fat is used to check FAT status fat_stat = check_fat_status(); if (fat_stat == 1) log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__); else if (fat_stat == 2) log_mesg(0, 1, 1, fs_opt.debug, "%s: I/O error! %X\n", __FILE__); for (i=0; i < cluster_count; i++){ /// If FAT16 if(FS == FAT_16){ block = check_fat16_entry(fat_bitmap, block, &bfree, &bused, &DamagedClusters); } else if (FS == FAT_32){ /// FAT32 block = check_fat32_entry(fat_bitmap, block, &bfree, &bused, &DamagedClusters); } else if (FS == FAT_12){ /// FAT12 block = check_fat12_entry(fat_bitmap, block, &bfree, &bused, &DamagedClusters); } else log_mesg(2, 0, 0, fs_opt.debug, "%s: error fs\n", __FILE__); } while(block < total_sector){ pc_set_bit(block, fat_bitmap); block++; } for (block = 0; block < total_sector; block++) { if (pc_test_bit(block, fat_bitmap)) { real_back_block++; } } free(fat_bitmap); log_mesg(2, 0, 0, fs_opt.debug, "%s: get_used_block down\n", __FILE__); return real_back_block; } partclone-0.2.51/src/fatclone.h000066400000000000000000000110511200565264100163200ustar00rootroot00000000000000/** * fatclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read hfsplus super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #define FAT_12 1 #define FAT_16 2 #define FAT_32 3 // describers the FAT Boot sector, stolen from libparted struct __attribute__ ((packed)) FatBootSector { uint8_t boot_jump[3]; /* 00: Boot strap short or near jump */ uint8_t system_id[8]; /* 03: system name */ uint16_t sector_size; /* 0b: bytes per logical sector */ uint8_t cluster_size; /* 0d: sectors/cluster */ uint16_t reserved; /* 0e: reserved sectors */ uint8_t fats; /* 10: number of FATs */ uint16_t dir_entries; /* 11: number of root directory entries */ uint16_t sectors; /* 13: if 0, total_sect supersedes */ uint8_t media; /* 15: media code */ uint16_t fat_length; /* 16: sectors/FAT for FAT12/16 */ uint16_t secs_track; /* 18: sectors per track */ uint16_t heads; /* 1a: number of heads */ uint32_t hidden; /* 1c: hidden sectors (partition start) */ uint32_t sector_count; /* 20: no. of sectors (if sectors == 0) */ union __attribute__ ((packed)) { /* FAT16 fields */ struct __attribute__ ((packed)) { uint8_t drive_num; /* 24: */ uint8_t empty_1; /* 25: */ uint8_t ext_signature; /* 26: always 0x29 */ uint32_t serial_number; /* 27: */ uint8_t volume_name [11]; /* 2b: */ uint8_t fat_name [8]; /* 36: */ uint8_t boot_code[448]; /* 3f: Boot code (or message) */ } fat16; /* FAT32 fields */ struct __attribute__ ((packed)) { uint32_t fat_length; /* 24: size of FAT in sectors */ uint16_t flags; /* 28: bit8: fat mirroring, low4: active fat */ uint16_t version; /* 2a: minor * 256 + major */ uint32_t root_dir_cluster; /* 2c: */ uint16_t info_sector; /* 30: */ uint16_t backup_sector; /* 32: */ uint8_t empty_1 [12]; /* 34: */ uint16_t drive_num; /* 40: */ uint8_t ext_signature; /* 42: always 0x29 */ uint32_t serial_number; /* 43: */ uint8_t volume_name [11]; /* 47: */ uint8_t fat_name [8]; /* 52: */ uint8_t boot_code[420]; /* 5a: Boot code (or message) */ } fat32; } u; uint16_t boot_sign; /* 1fe: always 0xAA55 */ }; typedef struct FatBootSector FatBootSector; struct FatFsInfo{ uint32_t magic; uint8_t rev[480]; uint32_t signature; uint32_t free_count; uint32_t next_free; uint32_t reserved2[3]; uint32_t trail; }; typedef struct FatFsInfo FatFsInfo; /// open device static void fs_open(char* device); /// close device static void fs_close(); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); /// readbitmap - cread and heck bitmap, reference dumpe2fs extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// return used block count static unsigned long long get_used_block(); ///get fat type static void get_fat_type(); /// return total sectors unsigned long long get_total_sector(); ///return sec_per_fat unsigned long long get_sec_per_fat(); ///return root sec unsigned long long get_root_sec(); /// return cluster count unsigned long long get_cluster_count(); /// check fat statu extern int check_fat_status(); /// mark reserved sectors as used static unsigned long long mark_reserved_sectors(unsigned long* fat_bitmap, unsigned long long block); /// check per FAT32 entry unsigned long long check_fat32_entry(unsigned long* fat_bitmap, unsigned long long block, unsigned long long* bfree, unsigned long long* bused, unsigned long long* DamagedClusters); /// check per FAT16 entry unsigned long long check_fat16_entry(unsigned long* fat_bitmap, unsigned long long block, unsigned long long* bfree, unsigned long long* bused, unsigned long long* DamagedClusters); partclone-0.2.51/src/fs_common.h000066400000000000000000000002071200565264100165060ustar00rootroot00000000000000#include struct fs_cmd_opt { int debug; int ignore_fschk; int force; }; typedef struct fs_cmd_opt fs_cmd_opt; partclone-0.2.51/src/fstype.c000066400000000000000000000032101200565264100160300ustar00rootroot00000000000000#include #include //#include vmfs_fs_t *fs; vmfs_volume_t *vol; vmfs_dir_t *root_dir; /// open device static int pvmfs_fs_open(char** device){ vmfs_lvm_t *lvm; vmfs_flags_t flags; vmfs_host_init(); flags.packed = 0; flags.allow_missing_extents = 1; #ifdef VMFS5_ZLA_BASE if (!(fs = vmfs_fs_open(device, flags))) { fprintf(stderr, "type: Unable to open volume (vmfs5).\n"); return 1; } vol = vmfs_vol_open(*device, flags); #else if (!(lvm = vmfs_lvm_create(flags))) { fprintf(stderr, "Unable to create LVM structure\n"); return 1; } vol = vmfs_vol_open(*device, flags); if (vmfs_lvm_add_extent(lvm, vol) == -1) { fprintf(stderr, "Unable to open device/file \"%s\".\n", device); return 1; } if (!(fs = vmfs_fs_create(lvm))) { fprintf(stderr, "Unable to open filesystem\n"); return 1; } if (vmfs_fs_open(fs) == -1) { fprintf(stderr, "type: Unable to open volume.\n"); return 1; } #endif if (!(root_dir = vmfs_dir_open_from_blkid(fs,VMFS_BLK_FD_BUILD(0,0,0)))) { fprintf(stderr, "Unable to open root directory\n"); return 1; } return 0; } /// close device static void pvmfs_vmfs_close(){ vmfs_dir_close(root_dir); vmfs_fs_close(fs); } int main (int argc, char **argv){ char* source; /// source data int ret; if( !argv[1]) { fprintf(stderr, "Please give the device name.\n"); return 1; } source=&argv[1]; ret = pvmfs_fs_open(source); if(ret == 0){ fprintf(stdout, "TYPE=\"vmfs%i\"\n", vol->vol_info.version); }else{ fprintf(stderr, "error exit\n"); return 1; } return 0; } partclone-0.2.51/src/gettext.h000066400000000000000000000221711200565264100162160ustar00rootroot00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (__GNUC__ >= 3 || __GNUG__ >= 2 /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ partclone-0.2.51/src/hfsplusclone.c000066400000000000000000000171751200565264100172420ustar00rootroot00000000000000/** hfsplusclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read hfsplus super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "partclone.h" #include "hfsplusclone.h" #include "progress.h" #include "fs_common.h" struct HFSPlusVolumeHeader sb; int ret; char *EXECNAME = "partclone.hfsp"; extern fs_cmd_opt fs_opt; static short reverseShort(short s){ unsigned char c1, c2; c1 = s & 255; c2 = (s >> 8) & 255; return (c1 << 8)+c2; } static int reverseInt(int i){ unsigned char c1, c2, c3, c4; c1 = i & 255; c2 = (i >> 8) & 255; c3 = (i >> 16)& 255; c4 = (i >> 24)& 255; return ((int)c1<<24)+((int)c2<<16)+((int)c3<<8)+c4; } static int IsAllocationBlockUsed(UInt32 thisAllocationBlock, UInt8* allocationFileContents) { UInt8 thisByte; thisByte = allocationFileContents[thisAllocationBlock / 8]; //log_mesg(0, 0, 0, fs_opt.debug, "IsAB:%i\n", (thisByte & (1 << (7 - (thisAllocationBlock % 8))))); return (thisByte & (1 << (7 - (thisAllocationBlock % 8)))) != 0; } static void print_fork_data(HFSPlusForkData* fork){ int i = 0; HFSPlusExtentDescriptor* exten; log_mesg(2, 0, 0, fs_opt.debug, "%s: logicalSize: %#lx\n", __FILE__, fork->logicalSize); log_mesg(2, 0, 0, fs_opt.debug, "%s: clumpSize: %i\n", __FILE__, reverseInt(fork->clumpSize)); log_mesg(2, 0, 0, fs_opt.debug, "%s: totalBlocks: %i\n", __FILE__, reverseInt(fork->totalBlocks)); for (i = 0; i < 8; i++ ){ exten = &fork->extents[i]; log_mesg(2, 0, 0, fs_opt.debug, "%s: \texten %i startBlock: %i\n", __FILE__, i, reverseInt(exten->startBlock)); log_mesg(2, 0, 0, fs_opt.debug, "%s: \texten %i blockCount: %i\n", __FILE__, i, reverseInt(fork->extents[i].blockCount)); } } /// open device static void fs_open(char* device){ int s, r; char *buffer; short HFS_Version; char HFS_Signature[2]; int HFS_Clean = 0; ret = open(device, O_RDONLY); s = lseek(ret, 1024, SEEK_SET); buffer = (char*)malloc(sizeof(HFSPlusVolumeHeader)); r = read (ret, buffer, sizeof(HFSPlusVolumeHeader)); memcpy(&sb, buffer, sizeof(HFSPlusVolumeHeader)); HFS_Signature[0] = (char)sb.signature; HFS_Signature[1] = (char)(sb.signature>>8); HFS_Version = (short)reverseShort(sb.version); HFS_Clean = (reverseInt(sb.attributes)>>8) & 1; log_mesg(3, 0, 0, fs_opt.debug, "%s: Signature=%c%c\n", __FILE__, HFS_Signature[0], HFS_Signature[1]); log_mesg(3, 0, 0, fs_opt.debug, "%s: Version=%i\n", __FILE__, HFS_Version); log_mesg(3, 0, 0, fs_opt.debug, "%s: Attr-Unmounted=%i(1 is clean, 0 is dirty)\n", __FILE__, HFS_Clean); log_mesg(3, 0, 0, fs_opt.debug, "%s: Attr-Inconsistent=%i\n", __FILE__, (reverseInt(sb.attributes)>>11) & 1); if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__); } else { if (HFS_Clean) log_mesg(3, 0, 0, fs_opt.debug, "%s: HFS_Plus '%s' is clean\n", __FILE__, device); else log_mesg(0, 1, 1, fs_opt.debug, "%s: HFS_Plus Volume '%s' is scheduled for a check or it was shutdown\nuncleanly. Please fix it by fsck.\n", __FILE__, device); } free(buffer); } static void fs_close(){ close(ret); } extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui){ int rd = 0, IsUsed = 0, sk = 0; UInt8 *extent_bitmap; UInt32 bused = 0, bfree = 0, mused = 0; UInt32 block = 0, extent_block = 0, tb = 0, i = 0; int allocation_exten = 0; UInt32 allocation_start_block; UInt32 allocation_block_size; int start = 0; int bit_size = 1; fs_open(device); tb = reverseInt(sb.totalBlocks); /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); memset(bitmap, 0xFF, sizeof(unsigned long)*LONGS(tb)); for (allocation_exten = 0; allocation_exten <= 7; allocation_exten++){ allocation_start_block = 4096*reverseInt(sb.allocationFile.extents[allocation_exten].startBlock); allocation_block_size = 4096*reverseInt(sb.allocationFile.extents[allocation_exten].blockCount); log_mesg(2, 0, 0, 2, "%s: tb = %lu\n", __FILE__, tb); log_mesg(2, 0, 0, 2, "%s: extent_block = %lu\n", __FILE__, extent_block); log_mesg(2, 0, 0, 2, "%s: allocation_exten = %i\n", __FILE__, allocation_exten); log_mesg(2, 0, 0, 2, "%s: allocation_start_block = %lu\n", __FILE__, allocation_start_block); log_mesg(2, 0, 0, 2, "%s: allocation_block_size = %lu\n", __FILE__, allocation_block_size); if((allocation_start_block == 0) && (allocation_block_size == 0)){ continue; } sk = lseek(ret, allocation_start_block, SEEK_SET); extent_bitmap = (UInt8*)malloc(allocation_block_size); rd = read(ret, extent_bitmap, allocation_block_size); for(extent_block = 0 ; (extent_block < allocation_block_size*8) && (block< tb); extent_block++){ IsUsed = IsAllocationBlockUsed(extent_block, extent_bitmap); if (IsUsed){ bused++; pc_set_bit(block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: used block= %i\n", __FILE__, block); } else { bfree++; pc_clear_bit(block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: free block= %i\n", __FILE__, block); } block++; /// update progress update_pui(&prog, block, block, 0); } free(extent_bitmap); log_mesg(2, 0, 0, 2, "%s: next exten\n", __FILE__); log_mesg(2, 0, 0, 2, "%s: extent_bitmap:%i\n", __FILE__, extent_bitmap); log_mesg(2, 0, 0, 2, "%s: bfree:%i\n", __FILE__, bfree); log_mesg(2, 0, 0, 2, "%s: bused:%i\n", __FILE__, bused); } mused = (reverseInt(sb.totalBlocks) - reverseInt(sb.freeBlocks)); if(bused != mused) log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap count error, used:%lu, mbitmap:%lu\n", __FILE__, bused, mused); fs_close(); /// update progress update_pui(&prog, 1, 1, 1); } extern void initial_image_hdr(char* device, image_head* image_hdr) { fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, hfsplus_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = (int)reverseInt(sb.blockSize); image_hdr->totalblock = (unsigned long long)reverseInt(sb.totalBlocks); image_hdr->device_size = (unsigned long long)(image_hdr->block_size * image_hdr->totalblock); image_hdr->usedblocks = (unsigned long long)(reverseInt(sb.totalBlocks) - reverseInt(sb.freeBlocks)); log_mesg(2, 0, 0, 2, "%s: blockSize:%i\n", __FILE__, reverseInt(sb.blockSize)); log_mesg(2, 0, 0, 2, "%s: totalBlocks:%i\n", __FILE__, reverseInt(sb.totalBlocks)); log_mesg(2, 0, 0, 2, "%s: freeBlocks:%i\n", __FILE__, reverseInt(sb.freeBlocks)); print_fork_data(&sb.allocationFile); print_fork_data(&sb.extentsFile); print_fork_data(&sb.catalogFile); print_fork_data(&sb.attributesFile); print_fork_data(&sb.startupFile); fs_close(); } partclone-0.2.51/src/hfsplusclone.h000066400000000000000000000051621200565264100172400ustar00rootroot00000000000000/** * hfsplusclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read hfsplus super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ typedef uint8_t UInt8; typedef uint16_t UInt16; typedef uint32_t UInt32; typedef uint64_t UInt64; typedef UInt32 HFSCatalogNodeID; struct HFSPlusExtentDescriptor { UInt32 startBlock; UInt32 blockCount; }; typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor; //typedef struct HFSPlusExtentDescriptor HFSPlusExtentRecord; struct HFSPlusForkData { UInt64 logicalSize; UInt32 clumpSize; UInt32 totalBlocks; HFSPlusExtentDescriptor extents[8]; }; typedef struct HFSPlusForkData HFSPlusForkData; struct HFSPlusVolumeHeader { UInt16 signature; UInt16 version; UInt32 attributes; UInt32 lastMountedVersion; UInt32 journalInfoBlock; UInt32 createDate; UInt32 modifyDate; UInt32 backupDate; UInt32 checkedDate; UInt32 fileCount; UInt32 folderCount; UInt32 blockSize; UInt32 totalBlocks; UInt32 freeBlocks; UInt32 nextAllocation; UInt32 rsrcClumpSize; UInt32 dataClumpSize; HFSCatalogNodeID nextCatalogID; UInt32 writeCount; UInt64 encodingsBitmap; UInt32 finderInfo[8]; HFSPlusForkData allocationFile; HFSPlusForkData extentsFile; HFSPlusForkData catalogFile; HFSPlusForkData attributesFile; HFSPlusForkData startupFile; }; typedef struct HFSPlusVolumeHeader HFSPlusVolumeHeader; static short reverseShort(short s); static int reverseInt(int i); static int IsAllocationBlockUsed(UInt32 thisAllocationBlock, UInt8* allocationFileContents); static void print_fork_data(HFSPlusForkData* fork); /// open device static void fs_open(char* device); /// close device static void fs_close(); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); /// readbitmap - cread and heck bitmap, reference dumpe2fs extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); partclone-0.2.51/src/infoclone.c000066400000000000000000000051451200565264100165030ustar00rootroot00000000000000/** * The part of partclone * * Copyright (c) 2007~ Thomas Tsai * * The utility to print out the Image information. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include /** * partclone.h - include some structures like image_head, opt_cmd, .... * and functions for main used. */ #include "partclone.h" cmd_opt opt; /// cmd_opt structure defined in partclone.h /** * main functiom - print Image file metadata. */ int main(int argc, char **argv){ char* source; /// source data int dfr; /// file descriptor for source and target unsigned long *bitmap; /// the point for bitmap data image_head image_hdr; /// image_head structure defined in partclone.h int debug = 1; if( !argv[1]) { printf("Please give the image file name.\n"); exit(0); } opt.source = argv[1]; opt.target = 0; opt.debug = 0; opt.clone = 0; opt.restore = 0; opt.logfile = "/var/log/partclone.log"; open_log(opt.logfile); /// print partclone info print_partclone_info(opt); /** * open Image file */ source = argv[1]; dfr = open(source, O_RDONLY); if (dfr == -1) printf("Can't open file(%s)\n", source); /// get image information from image file restore_image_hdr(&dfr, &opt, &image_hdr); if (memcmp(image_hdr.magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE) != 0) log_mesg(0, 1, 1, debug, "The Image magic error. This file is NOT partclone Image\n"); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); log_mesg(0, 0, 0, debug, "initial main bitmap pointer %lli\n", bitmap); log_mesg(0, 0, 0, debug, "Initial image hdr: read bitmap table\n"); /// read and check bitmap from image file get_image_bitmap(&dfr, opt, image_hdr, bitmap); log_mesg(0, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(0, 0, 0, debug, "print image_head\n"); /// print image_head print_image_hdr_info(image_hdr, opt); close (dfr); /// close source free(bitmap); /// free bitmp close_log(); return 0; /// finish } partclone-0.2.51/src/jfsclone.c000066400000000000000000000375261200565264100163420ustar00rootroot00000000000000/** * jfsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiserfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "partclone.h" #include "jfsclone.h" #include "progress.h" #include "fs_common.h" /* DMAP BLOCK TYPES */ #define DMAP -1 #define LEVEL0 0 #define LEVEL1 1 #define LEVEL2 2 /* DMAP BLOCK CALCULATIONS */ #define L0FACTOR (LPERCTL + 1) //LPERCTL=1024 #define L1FACTOR ((L0FACTOR * LPERCTL) + 1) #define L1PAGE(l1) (2 + ((l1) * L1FACTOR)) #define L0PAGE(l1, l0) (L1PAGE(l1) + 1 + ((l0) * L0FACTOR)) #define DMAPPAGE(l1, l0, d) (L0PAGE(l1, l0) + 1 + (d)) #define XT_CMP(CMP, K, X) \ { \ int64_t offset64 = offsetXAD(X); \ (CMP) = ((K) >= offset64 + lengthXAD(X)) ? 1 : \ ((K) < offset64) ? -1 : 0 ; \ } static int decode_pagenum(int64_t page, int *l1, int *l0, int *dmap); static int find_iag(unsigned iagnum, unsigned which_table, int64_t * address); static int find_inode(unsigned inum, unsigned which_table, int64_t * address); static int xRead(int64_t, unsigned, char *); static int jfs_bit_inuse(unsigned *bitmap, uint64_t block); static uint64_t get_all_used_blocks(uint64_t *total_blocks, uint64_t *used_blocks); struct superblock sb; FILE *fp; int bsize; short l2bsize; unsigned jfs_type; char *EXECNAME = "partclone.jfs"; extern fs_cmd_opt fs_opt; /// open device static void fs_open(char* device){ fp = fopen(device, "r+"); if (fp == NULL) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Cannot open device %s.\n", __FILE__, device); } if (ujfs_get_superblk(fp, &sb, 1)) { log_mesg(0, 1, 1, fs_opt.debug, "%s: error reading primary superblock\n", __FILE__); if (ujfs_get_superblk(fp, &sb, 0)) { log_mesg(0, 1, 1, fs_opt.debug, "%s: error reading secondary superblock\n", __FILE__); } else log_mesg(1, 0, 0, fs_opt.debug, "%s: using secondary superblock\n", __FILE__); } jfs_type = sb.s_flag; l2bsize = sb.s_l2bsize; bsize = sb.s_bsize; log_mesg(1, 0, 0, fs_opt.debug, "%s: type = %u\n", __FILE__, sb.s_flag); log_mesg(1, 0, 0, fs_opt.debug, "%s: block size = %i\n", __FILE__, sb.s_bsize); log_mesg(1, 0, 0, fs_opt.debug, "%s: magic = %s\n", __FILE__, sb.s_magic); log_mesg(1, 0, 0, fs_opt.debug, "%s: version = %u\n", __FILE__, sb.s_version); log_mesg(1, 0, 0, fs_opt.debug, "%s: blocks = %lli\n", __FILE__, sb.s_size); log_mesg(1, 0, 0, fs_opt.debug, "%s: l2bsize = %i\n", __FILE__, sb.s_l2bsize); } /// close device static void fs_close(){ fclose(fp); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui){ int64_t lblock = 0; int64_t address; int64_t cntl_addr; int ret = 1; struct dinode bmap_inode; struct dbmap cntl_page; int dmap_l2bpp; int64_t d_address; struct dmap d_map; int dmap_i, l0, l1; int next = 1; int64_t btotal, bfree; int64_t tub; int64_t tb=0; int64_t pb = 1; int64_t block_used = 0; int64_t block_free = 0; uint64_t logloc = 0; int logsize = 0; int dmap_level = 0; int64_t dn_mapsize = 0; int start = 0; int bit_size = 1; fs_open(device); /// Read Blocal Allocation Map Inode ret = find_inode(BMAP_I, AGGREGATE_I, &address); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):find_node error.\n", __FILE__, __LINE__); } ret = xRead(address, sizeof(struct dinode), (char *) &bmap_inode); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):xRead error.\n", __FILE__, __LINE__); } /// Read overall control page for the map ret = ujfs_rwdaddr(fp, &cntl_addr, &bmap_inode, (int64_t) 0, GET, bsize); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):ujfs_rwdaddr error.\n", __FILE__, __LINE__); } ret = xRead(cntl_addr, sizeof(struct dbmap), (char *) &cntl_page); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):xRead error %i\n", __FILE__, __LINE__); } dn_mapsize = cntl_page.dn_mapsize; dmap_level = BMAPSZTOLEV(cntl_page.dn_mapsize); dmap_l2bpp = cntl_page.dn_l2nbperpage; /// display leaf lblock = 0; //control page decode_pagenum(lblock, &l1, &l0, &dmap_i); ret = ujfs_rwdaddr(fp, &d_address, &bmap_inode, (lblock) << dmap_l2bpp, GET, bsize); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):ujfs_rwdaddr error.\n", __FILE__, __LINE__); } ret = xRead(d_address, sizeof(struct dmap), (char *)&d_map); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):xRead error.\n", __FILE__, __LINE__); } /// ujfs_swap_dmap(&d_map); fixme log_mesg(2, 0, 0, fs_opt.debug, "%s: Dmap page at block %lld\n", __FILE__, (long long) (d_address >> sb.s_l2bsize)); log_mesg(2, 0, 0, fs_opt.debug, "%s: control nblocks %d\n", __FILE__, d_map.nblocks); log_mesg(2, 0, 0, fs_opt.debug, "%s: control nfree %d\n", __FILE__, d_map.nfree); lblock = 4; //First map page logloc = addressPXD(&(sb.s_logpxd)); logsize = lengthPXD(&(sb.s_logpxd)); log_mesg(1, 0, 0, fs_opt.debug, "%s: logloc %lli, logsize %i\n", __FILE__, logloc, logsize); /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); memset(bitmap, 0xFF, sizeof(unsigned long)*LONGS(image_hdr.totalblock)); while(next){ block_used = 0; block_free = 0; log_mesg(2, 0, 0, fs_opt.debug, "%s:lblock = %lli\n", __FILE__, lblock); decode_pagenum(lblock, &l1, &l0, &dmap_i); ret = ujfs_rwdaddr(fp, &d_address, &bmap_inode, (lblock) << dmap_l2bpp, GET, bsize); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):ujfs_rwdaddr error.\n", __FILE__, __LINE__); } ret = xRead(d_address, sizeof(struct dmap), (char *)&d_map); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):xRead error.\n", __FILE__, __LINE__); } ///ujfs_swap_dmap(&d_map); log_mesg(2, 0, 0, fs_opt.debug, "%s: Dmap page at block %lld\n", __FILE__, (long long) (d_address >> sb.s_l2bsize)); log_mesg(2, 0, 0, fs_opt.debug, "%s: nblocks %d\n", __FILE__, d_map.nblocks); log_mesg(2, 0, 0, fs_opt.debug, "%s: nfree %d\n", __FILE__, d_map.nfree); /// bitmap information not cover all partition /// display bitmap for (pb = 0; (pb < d_map.nblocks) && (tb < dn_mapsize); pb++){ if (jfs_bit_inuse(d_map.wmap, pb) == 1){ block_used++; log_mesg(3, 0, 0, fs_opt.debug, "%s: used pb = %lli tb = %lli\n", __FILE__, pb, tb); pc_set_bit(tb, bitmap); } else { block_free++; log_mesg(3, 0, 0, fs_opt.debug, "%s: free pb = %lli tb = %lli\n", __FILE__, pb, tb); pc_clear_bit(tb, bitmap); } tb++; update_pui(&prog, tb, tb, 0);//keep update } log_mesg(2, 0, 0, fs_opt.debug, "%s:block_used %lli block_free %lli\n", __FILE__, block_used, block_free); tub += block_used; next = 0; if (dmap_i < LPERCTL - 1){ lblock = DMAPPAGE(l1, l0, dmap_i + 1); next = 1; } if (dmap_level > 0) { if (l0 < LPERCTL - 1){ lblock = DMAPPAGE(l1, l0+1, 0); next = 1; } if ((dmap_level == 2) && (l1 < LPERCTL - 1)) { lblock = DMAPPAGE(l1+1, 0, 0); next = 1; } } if (tb >= dn_mapsize) next = 0; if (d_map.nblocks == 0) next = 0; } /// log for (;tb <= image_hdr.totalblock; tb++){ if ((tb >= logloc) && (tb < (logloc+logsize))){ pc_set_bit(tb, bitmap); block_used++; log_mesg(3, 0, 0, fs_opt.debug, "%s: log used pb = %lli tb = %lli\n", __FILE__, pb, tb); } update_pui(&prog, tb, tb, 0);//keep update } log_mesg(2, 0, 0, fs_opt.debug, "%s:total_used = %lli\n", __FILE__, tub); fs_close(); update_pui(&prog, 1, 1, 1);//finish } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr){ uint64_t used_blocks = 0; uint64_t total_blocks = 0; fs_open(device); get_all_used_blocks(&total_blocks, &used_blocks); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, jfs_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = (int)sb.s_bsize; image_hdr->totalblock = (unsigned long long)total_blocks; image_hdr->usedblocks = (unsigned long long)used_blocks; image_hdr->device_size =(unsigned long long)(total_blocks * sb.s_bsize); fs_close(); } /// get_all_used_blocks extern uint64_t get_all_used_blocks(uint64_t *total_blocks, uint64_t *used_blocks){ int64_t lblock = 0; int64_t address; int64_t cntl_addr; int ret = 1; struct dinode bmap_inode; struct dbmap cntl_page; int dmap_l2bpp; int64_t d_address; struct dmap d_map; int dmap, l0, l1; int next = 1; int64_t btotal, bfree; int64_t tub; int64_t tb=0; int64_t pb = 0; int64_t block_used = 0; int64_t block_free = 0; int64_t bytes_on_device = 0; int logsize = 0; /// Read Blocal Allocation Map Inode ret = find_inode(BMAP_I, AGGREGATE_I, &address); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):find_node error.\n", __FILE__, __LINE__); } ret = xRead(address, sizeof(struct dinode), (char *) &bmap_inode); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):xRead error.\n", __FILE__, __LINE__); } /// Read overall control page for the map ret = ujfs_rwdaddr(fp, &cntl_addr, &bmap_inode, (int64_t) 0, GET, bsize); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):ujfs_rwdaddr error.\n", __FILE__, __LINE__); } ret = xRead(cntl_addr, sizeof(struct dbmap), (char *) &cntl_page); if (ret){ log_mesg(0, 1, 1, fs_opt.debug, "%s(%i):xRead error.\n", __FILE__, __LINE__); } logsize = lengthPXD(&(sb.s_logpxd)); ret = ujfs_get_dev_size(fp, &bytes_on_device); *total_blocks = bytes_on_device / sb.s_bsize; *used_blocks = (cntl_page.dn_mapsize - cntl_page.dn_nfree + logsize); log_mesg(2, 0, 0, fs_opt.debug, "%s: dn.mapsize = %lli\n", __FILE__, cntl_page.dn_mapsize); log_mesg(2, 0, 0, fs_opt.debug, "%s: total_blocks = %lli\n", __FILE__, *total_blocks); log_mesg(2, 0, 0, fs_opt.debug, "%s: free_blocks = %lli\n", __FILE__, cntl_page.dn_nfree); log_mesg(2, 0, 0, fs_opt.debug, "%s: log_blocks = %i\n", __FILE__, logsize); } int decode_pagenum(int64_t page, int *l1, int *l0, int *dmap) { int remainder; if (page == 0) return -1; if (page == 1) return LEVEL2; *l1 = (page - 2) / L1FACTOR; remainder = (page - 2) % L1FACTOR; if (remainder == 0) return LEVEL1; *l0 = (remainder - 1) / L0FACTOR; remainder = (remainder - 1) % L0FACTOR; if (remainder == 0) return LEVEL0; *dmap = remainder - 1; return DMAP; } int find_inode(unsigned inum, unsigned which_table, int64_t * address) { int extnum; struct iag iag; int iagnum; int64_t map_address; int rc; iagnum = INOTOIAG(inum); extnum = (inum & (INOSPERIAG - 1)) >> L2INOSPEREXT; if (find_iag(iagnum, which_table, &map_address) == 1) return 1; rc = ujfs_rw_diskblocks(fp, map_address, sizeof (struct iag), &iag, GET); if (rc) { log_mesg(1, 1, 1, fs_opt.debug, "%s: find_inode: Error reading iag\n", __FILE__); return 1; } /* swap if on big endian machine */ ///ujfs_swap_iag(&iag); if (iag.inoext[extnum].len == 0) return 1; *address = (addressPXD(&iag.inoext[extnum]) << l2bsize) + ((inum & (INOSPEREXT - 1)) * sizeof (struct dinode)); return 0; } int xRead(int64_t address, unsigned count, char *buffer) { int64_t block_address; char *block_buffer; int64_t length; unsigned offset; offset = address & (bsize - 1); length = (offset + count + bsize - 1) & ~(bsize - 1); log_mesg(3, 0, 0, fs_opt.debug, "%s: offset %i, length %lli, count %i, address %lli\n", __FILE__, offset , length , count , address); if ((offset == 0) & (length == count)) return ujfs_rw_diskblocks(fp, address, count, buffer, GET); block_address = address - offset; block_buffer = (char *) malloc(length); if (block_buffer == 0) return 1; if (ujfs_rw_diskblocks(fp, block_address, length, block_buffer, GET)) { log_mesg(3, 0, 0, fs_opt.debug, "%s: block_address %lli , length %lli , GET %i \n", __FILE__, block_address, length, GET); free(block_buffer); return 1; } memcpy(buffer, block_buffer + offset, count); free(block_buffer); log_mesg(3, 0, 0, fs_opt.debug, "%s: done: offset %i, length %lli, count %i, address %lli\n", __FILE__, offset , length , count , address); return 0; } int find_iag(unsigned iagnum, unsigned which_table, int64_t * address) { int base; char buffer[PSIZE]; int cmp; struct dinode fileset_inode; int64_t fileset_inode_address; int64_t iagblock; int index; int lim; xtpage_t *page; int rc; int64_t AIT_2nd_offset = addressPXD(&(sb.s_ait2)) * sb.s_bsize; if (which_table != FILESYSTEM_I && which_table != AGGREGATE_I && which_table != AGGREGATE_2ND_I) { log_mesg(1, 1, 1, fs_opt.debug, "%s: find_iag: Invalid fileset, %d\n", __FILE__, which_table); return 1; } iagblock = IAGTOLBLK(iagnum, L2PSIZE - l2bsize); if (which_table == AGGREGATE_2ND_I) { fileset_inode_address = AIT_2nd_offset + sizeof (struct dinode); } else { fileset_inode_address = AGGR_INODE_TABLE_START + (which_table * sizeof (struct dinode)); } rc = xRead(fileset_inode_address, sizeof (struct dinode), (char *) &fileset_inode); if (rc) { log_mesg(1, 1, 1, fs_opt.debug, "%s: find_inode: Error reading fileset inode\n", __FILE__); return 1; } page = (xtpage_t *) & (fileset_inode.di_btroot); descend: /* Binary search */ for (base = XTENTRYSTART, lim = __le16_to_cpu(page->header.nextindex) - XTENTRYSTART; lim; lim >>= 1) { index = base + (lim >> 1); XT_CMP(cmp, iagblock, &(page->xad[index])); if (cmp == 0) { /* HIT! */ if (page->header.flag & BT_LEAF) { *address = (addressXAD(&(page->xad[index])) + (iagblock - offsetXAD(&(page->xad[index])))) << l2bsize; return 0; } else { rc = xRead(addressXAD(&(page->xad[index])) << l2bsize, PSIZE, buffer); if (rc) { log_mesg(1, 1, 1, fs_opt.debug, "%s: find_iag: Error reading btree node\n", __FILE__); return 1; } page = (xtpage_t *) buffer; goto descend; } } else if (cmp > 0) { base = index + 1; --lim; } } if (page->header.flag & BT_INTERNAL) { /* Traverse internal page, it might hit down there * If base is non-zero, decrement base by one to get the parent * entry of the child page to search. */ index = base ? base - 1 : base; rc = xRead(addressXAD(&(page->xad[index])) << l2bsize, PSIZE, buffer); if (rc) { log_mesg(1, 1, 1, fs_opt.debug, "%s: find_iag: Error reading btree node\n", __FILE__); return 1; } page = (xtpage_t *) buffer; goto descend; } /* Not found! */ log_mesg(1, 1, 1, fs_opt.debug, "%s: find_iag: IAG %d not found!\n", __FILE__, iagnum); return 1; } int jfs_bit_inuse(unsigned *bitmap, uint64_t block){ uint64_t byte = 0; int bit = 0; byte = block/32; bit = 31 - (block%32); log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap = %08x\n", __FILE__, bitmap[byte]); if(bitmap[byte] & (1< * * read reiser4 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); /// libfs/jfs_endian.h #define GET 0 /// libfs/devices.h /// xpeek.h #define AGGREGATE_2ND_I -1 partclone-0.2.51/src/main.c000066400000000000000000000752041200565264100154560ustar00rootroot00000000000000/** * The main program of partclone * * Copyright (c) 2007~ Thomas Tsai * * clone/restore partition to a image, device or stdout. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * progress.h - only for progress bar */ #include "progress.h" void *thread_update_pui(void *arg); progress_bar prog; /// progress_bar structure defined in progress.h unsigned long long copied; unsigned long long block_id; int done; /** * partclone.h - include some structures like image_head, opt_cmd, .... * and functions for main used. */ #include "partclone.h" /// global variable cmd_opt opt; /// cmd_opt structure defined in partclone.h /** * Include different filesystem header depend on what flag you want. * If cflag is _EXTFS, output to extfsclone. * My goal is give different clone utils by makefile . */ #ifdef EXTFS #include "extfsclone.h" #define FS "EXTFS" #elif REISERFS #include "reiserfsclone.h" #define FS "REISERFS" #elif REISER4 #include "reiser4clone.h" #define FS "REISER4" #elif XFS #include "xfsclone.h" #define FS "XFS" #elif HFSPLUS #include "hfsplusclone.h" #define FS "HFS Plus" #elif FAT #include "fatclone.h" #define FS "FAT" #elif NTFS #include "ntfsclone-ng.h" #define FS "NTFS" #elif UFS #include "ufsclone.h" #define FS "UFS" #elif VMFS #include "vmfsclone.h" #define FS "VMFS" #elif JFS #include "jfsclone.h" #define FS "JFS" #elif BTRFS #include "btrfsclone.h" #define FS "BTRFS" #elif EXFAT #include "exfatclone.h" #define FS "EXFAT" #endif /// fs option #include "fs_common.h" fs_cmd_opt fs_opt; /// cmd_opt structure defined in partclone.h /** * main functiom - for colne or restore data */ int main(int argc, char **argv){ #ifdef MEMTRACE setenv("MALLOC_TRACE", "partclone_mtrace.log", 1); mtrace(); #endif char* source; /// source data char* target; /// target data char* buffer; /// buffer data for malloc used char* buffer2; /// buffer data for malloc used int dfr, dfw; /// file descriptor for source and target int r_size, w_size; /// read and write size //unsigned long long block_id, copied = 0; /// block_id is every block in partition /// copied is copied block count off_t offset = 0, sf = 0; /// seek postition, lseek result int start, stop; /// start, range, stop number for progress bar unsigned long long total_write = 0; /// the copied size unsigned long long needed_size = 0; /// the copied size unsigned long long needed_mem = 0; /// the copied size char bitmagic[8] = "BiTmAgIc";// only for check postition char bitmagic_r[8]="00000000";/// read magic string from image int cmp; /// compare magic string unsigned long *bitmap; /// the point for bitmap data int debug = 0; /// debug or not unsigned long crc = 0xffffffffL; /// CRC32 check code for writint to image unsigned long crc_ck = 0xffffffffL; /// CRC32 check code for checking unsigned long crc_ck2 = 0xffffffffL; /// CRC32 check code for checking int c_size; /// CRC32 code size int n_crc_size = CRC_SIZE; //int done = 0; int s_count = 0; int rescue_num = 0; unsigned long long rescue_pos = 0; unsigned long long main_pos = 0; int tui = 0; /// text user interface int pui = 0; /// progress mode(default text) int next=1,next_int=1,next_max_count=7,next_count=7,i; unsigned long long next_block_id; char* cache_buffer; int nx_current=0; char bbuffer[4096]; int flag; int pres; pthread_t prog_thread; void *p_result; static const char *const bad_sectors_warning_msg = "*************************************************************************\n" "* WARNING: The disk has bad sectors. This means physical damage on the *\n" "* disk surface caused by deterioration, manufacturing faults, or *\n" "* another reason. The reliability of the disk may remain stable or *\n" "* degrade quickly. Use the --rescue option to efficiently save as much *\n" "* data as possible! *\n" "*************************************************************************\n"; image_head image_hdr; /// image_head structure defined in partclone.h memset(&image_hdr, 0, sizeof(image_hdr)); /** * get option and assign to opt structure * check parameter and read from argv */ parse_options(argc, argv, &opt); /** * if "-d / --debug" given * open debug file in "/var/log/partclone.log" for log message */ memset(&fs_opt, 0, sizeof(fs_cmd_opt)); debug = opt.debug; fs_opt.debug = debug; fs_opt.ignore_fschk = opt.ignore_fschk; next_max_count = opt.max_block_cache-1; next_count = opt.max_block_cache-1; //if(opt.debug) open_log(opt.logfile); /** * using Text User Interface */ if (opt.ncurses){ pui = NCURSES; log_mesg(1, 0, 0, debug, "Using Ncurses User Interface mode.\n"); } else pui = TEXT; tui = open_pui(pui, opt.fresh); if ((opt.ncurses) && (tui == 0)){ opt.ncurses = 0; log_mesg(1, 0, 0, debug, "Open Ncurses User Interface Error.\n"); } /// print partclone info print_partclone_info(opt); if (geteuid() != 0) log_mesg(0, 1, 1, debug, "You are not logged as root. You may have \"access denied\" errors when working.\n"); else log_mesg(1, 0, 0, debug, "UID is root.\n"); /// ignore crc check if(opt.ignore_crc) log_mesg(1, 0, 1, debug, "Ignore CRC errors\n"); /** * open source and target * clone mode, source is device and target is image file/stdout * restore mode, source is image file/stdin and target is device * dd mode, source is device and target is device !!not complete */ #ifdef _FILE_OFFSET_BITS log_mesg(1, 0, 0, debug, "enable _FILE_OFFSET_BITS %i\n", _FILE_OFFSET_BITS); #endif source = opt.source; target = opt.target; dfr = open_source(source, &opt); if (dfr == -1) { log_mesg(0, 1, 1, debug, "Error exit\n"); } dfw = open_target(target, &opt); if (dfw == -1) { log_mesg(0, 1, 1, debug, "Error exit\n"); } /** * get partition information like super block, image_head, bitmap * from device or image file. */ if (opt.clone){ log_mesg(1, 0, 0, debug, "Initial image hdr - get Super Block from partition\n"); log_mesg(0, 0, 1, debug, "Reading Super Block\n"); /// get Super Block information from partition initial_image_hdr(source, &image_hdr); /// check memory size if (check_mem_size(image_hdr, opt, &needed_mem) == -1) log_mesg(0, 1, 1, debug, "There is not enough free memory, partclone suggests you should have %lld bytes memory\n", needed_mem); strncpy(image_hdr.version, IMAGE_VERSION, VERSION_SIZE); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); if(bitmap == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } log_mesg(2, 0, 0, debug, "initial main bitmap pointer %i\n", bitmap); log_mesg(1, 0, 0, debug, "Initial image hdr - read bitmap table\n"); /// read and check bitmap from partition log_mesg(0, 0, 1, debug, "Calculating bitmap... Please wait... "); readbitmap(source, image_hdr, bitmap, pui); needed_size = (unsigned long long)(((image_hdr.block_size+sizeof(unsigned long))*image_hdr.usedblocks)+sizeof(image_hdr)+sizeof(char)*image_hdr.totalblock); if (opt.check) check_free_space(&dfw, needed_size); log_mesg(2, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(1, 0, 0, debug, "Writing super block and bitmap... "); // write image_head to image file w_size = write_all(&dfw, (char *)&image_hdr, sizeof(image_head), &opt); if(w_size == -1) log_mesg(0, 1, 1, debug, "write image_hdr to image error\n"); // write bitmap information to image file for (i = 0; i < image_hdr.totalblock; i++){ if (pc_test_bit(i, bitmap)){ bbuffer[i % sizeof(bbuffer)] = 1; } else { bbuffer[i % sizeof(bbuffer)] = 0; } if (i % sizeof(bbuffer) == sizeof(bbuffer) - 1 || i == image_hdr.totalblock - 1) { w_size = write_all(&dfw, bbuffer, 1 + (i % sizeof(bbuffer)), &opt); if(w_size == -1) log_mesg(0, 1, 1, debug, "write bitmap to image error\n"); } } log_mesg(0, 0, 1, debug, "done!\n"); } else if (opt.restore){ log_mesg(1, 0, 0, debug, "restore image hdr - get image_head from image file\n"); log_mesg(1, 0, 1, debug, "Reading Super Block\n"); /// get image information from image file restore_image_hdr(&dfr, &opt, &image_hdr); /// check memory size if (check_mem_size(image_hdr, opt, &needed_mem) == -1) log_mesg(0, 1, 1, debug, "Ther is no enough free memory, partclone suggests you should have %lld bytes memory\n", needed_mem); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); if(bitmap == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } /// check the image magic if (memcmp(image_hdr.magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE) != 0) log_mesg(0, 1, 1, debug, "This is not partclone image.\n"); /// check the file system //if (strcmp(image_hdr.fs, FS) != 0) // log_mesg(0, 1, 1, debug, "%s can't restore from the image which filesystem is %s not %s\n", argv[0], image_hdr.fs, FS); log_mesg(2, 0, 0, debug, "initial main bitmap pointer %lli\n", bitmap); log_mesg(1, 0, 0, debug, "Initial image hdr - read bitmap table\n"); /// read and check bitmap from image file log_mesg(0, 0, 1, debug, "Calculating bitmap... Please wait... "); get_image_bitmap(&dfr, opt, image_hdr, bitmap); /// check the dest partition size. if (opt.restore_raw_file) check_free_space(&dfw, image_hdr.device_size); else if(opt.check) check_size(&dfw, image_hdr.device_size); log_mesg(2, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(0, 0, 1, debug, "done!\n"); } else if (opt.dd){ log_mesg(1, 0, 0, debug, "Initial image hdr - get Super Block from partition\n"); log_mesg(1, 0, 1, debug, "Reading Super Block\n"); /// get Super Block information from partition initial_image_hdr(source, &image_hdr); /// check memory size if (check_mem_size(image_hdr, opt, &needed_mem) == -1) log_mesg(0, 1, 1, debug, "Ther is no enough free memory, partclone suggests you should have %lld bytes memory\n", needed_mem); strncpy(image_hdr.version, IMAGE_VERSION, VERSION_SIZE); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); if(bitmap == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } log_mesg(2, 0, 0, debug, "initial main bitmap pointer %i\n", bitmap); log_mesg(1, 0, 0, debug, "Initial image hdr - read bitmap table\n"); /// read and check bitmap from partition log_mesg(0, 0, 1, debug, "Calculating bitmap... Please wait... "); readbitmap(source, image_hdr, bitmap, pui); /// check the dest partition size. if(opt.check){ check_size(&dfw, image_hdr.device_size); } log_mesg(2, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(0, 0, 1, debug, "done!\n"); } else if (opt.domain) { log_mesg(1, 0, 0, debug, "Initial image hdr - get Super Block from partition\n"); log_mesg(1, 0, 1, debug, "Reading Super Block\n"); /// get Super Block information from partition initial_image_hdr(source, &image_hdr); /// check memory size if (check_mem_size(image_hdr, opt, &needed_mem) == -1) log_mesg(0, 1, 1, debug, "Ther is no enough free memory, partclone suggests you should have %lld bytes memory\n", needed_mem); strncpy(image_hdr.version, IMAGE_VERSION, VERSION_SIZE); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); if(bitmap == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } log_mesg(2, 0, 0, debug, "initial main bitmap pointer %i\n", bitmap); log_mesg(1, 0, 0, debug, "Initial image hdr - read bitmap table\n"); /// read and check bitmap from partition log_mesg(0, 0, 1, debug, "Calculating bitmap... Please wait... "); readbitmap(source, image_hdr, bitmap, pui); log_mesg(2, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(0, 0, 1, debug, "done!\n"); } log_mesg(1, 0, 0, debug, "print image_head\n"); /// print option to log file if (debug) print_opt(opt); /// print image_head print_image_hdr_info(image_hdr, opt); /** * initial progress bar */ //progress_bar prog; /// progress_bar structure defined in progress.h start = 0; /// start number of progress bar stop = (image_hdr.usedblocks); /// get the end of progress number, only used block log_mesg(1, 0, 0, debug, "Initial Progress bar\n"); /// Initial progress bar if (opt.no_block_detail) flag = NO_BLOCK_DETAIL; else flag = IO; progress_init(&prog, start, stop, image_hdr.totalblock, flag, image_hdr.block_size); copied = 0; /// initial number is 0 /** * thread to print progress */ pres = pthread_create(&prog_thread, NULL, thread_update_pui, NULL); /** * start read and write data between device and image file */ if (opt.clone) { w_size = write_all(&dfw, bitmagic, 8, &opt); /// write a magic string /// read data from the first block and log the offset sf = lseek(dfr, 0, SEEK_SET); log_mesg(1, 0, 0, debug, "seek %lli for reading data string\n",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "seek set %lli\n", sf); buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } log_mesg(0, 0, 0, debug, "Total block %i\n", image_hdr.totalblock); /// start clone partition to image file log_mesg(1, 0, 0, debug, "start backup data...\n"); for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){ r_size = 0; w_size = 0; main_pos = lseek(dfr, 0, SEEK_CUR); log_mesg(3, 0, 0, debug, "man pos = %lli\n", main_pos); if (pc_test_bit(block_id, bitmap)){ /// if the block is used log_mesg(1, 0, 0, debug, "block_id=%lli, ",block_id); log_mesg(2, 0, 0, debug, "bitmap=%i, ",pc_test_bit(block_id, bitmap)); offset = (off_t)(block_id * image_hdr.block_size); #ifdef _FILE_OFFSET_BITS sf = lseek(dfr, offset, SEEK_SET); if (sf == -1) log_mesg(0, 1, 1, debug, "source seek error = %lli, ",sf); #endif /// read data from source to buffer memset(buffer, 0, image_hdr.block_size); rescue_pos = lseek(dfr, 0, SEEK_CUR); r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(3, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size != (int)image_hdr.block_size){ if ((r_size == -1) && (errno == EIO)){ if (opt.rescue){ r_size = 0; for (rescue_num = 0; rescue_num < image_hdr.block_size; rescue_num += SECTOR_SIZE){ rescue_sector(&dfr, rescue_pos + rescue_num, buffer + rescue_num, &opt); r_size+=SECTOR_SIZE; } }else log_mesg(0, 1, 1, debug, "%s", bad_sectors_warning_msg); }else log_mesg(0, 1, 1, debug, "read error: %s(%i) \n", strerror(errno), errno); } /// write buffer to target w_size = write_all(&dfw, buffer, image_hdr.block_size, &opt); log_mesg(3, 0, 0, debug, "bs=%i and w=%i, ",image_hdr.block_size, w_size); if (w_size != (int)image_hdr.block_size) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); /// generate crc32 code and write it. crc = crc32(crc, buffer, w_size); char crc_buffer[CRC_SIZE]; memcpy(crc_buffer, &crc, CRC_SIZE); c_size = write_all(&dfw, crc_buffer, CRC_SIZE, &opt); copied++; /// count copied block total_write += (unsigned long long)(w_size); /// count copied size log_mesg(3, 0, 0, debug, "total=%lli, ", total_write); /// read or write error if (r_size != w_size) log_mesg(0, 1, 1, debug, "read(%i) and write(%i) different\n", r_size, w_size); log_mesg(2, 0, 0, debug, "end\n"); } else { #ifndef _FILE_OFFSET_BITS /// if the block is not used, I just skip it. log_mesg(2, 0, 0, debug, "block_id=%lli, ",block_id); sf = lseek(dfr, image_hdr.block_size, SEEK_CUR); log_mesg(2, 0, 0, debug, "skip seek=%lli, ",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "clone seek error %lli errno=%i\n", (long long)offset, (int)errno); log_mesg(2, 0, 0, debug, "end\n"); #endif } } /// end of for free(buffer); } else if (opt.restore) { /** * read magic string from image file * and check it. */ r_size = read_all(&dfr, bitmagic_r, 8, &opt); /// read a magic string cmp = memcmp(bitmagic, bitmagic_r, 8); if(cmp != 0) log_mesg(0, 1, 1, debug, "bitmagic error %i\n", cmp); /// seek to the first sf = lseek(dfw, 0, SEEK_SET); log_mesg(1, 0, 0, debug, "seek %lli for writing data string\n",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "seek set %lli\n", sf); cache_buffer = (char*)malloc(image_hdr.block_size * (next_max_count+1)); if(cache_buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } /// start restore image file to partition log_mesg(1, 0, 0, debug, "start restore data...\n"); for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){ r_size = 0; w_size = 0; if (pc_test_bit(block_id, bitmap)){ /// The block is used log_mesg(1, 0, 0, debug, "block_id=%lli, ",block_id); log_mesg(2, 0, 0, debug, "bitmap=%i, ",pc_test_bit(block_id, bitmap)); memset(buffer, 0, image_hdr.block_size); r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(3, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size <0) log_mesg(0, 1, 1, debug, "read errno = %i \n", errno); /// read crc32 code and check it. crc_ck = crc32(crc_ck, buffer, r_size); char crc_buffer[CRC_SIZE]; c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt); if (c_size < CRC_SIZE) log_mesg(0, 1, 1, debug, "read CRC error: %s, please check your image file. \n", strerror(errno)); /*FIX: 64bit image can't ignore crc error*/ if ((memcmp(crc_buffer, &crc_ck, CRC_SIZE) != 0) && (!opt.ignore_crc)){ log_mesg(1, 0, 0, debug, "CRC Check error. 64bit bug before v0.1.0 (Rev:250M), enlarge crc size and recheck again....\n "); /// check again buffer2 = (char*)malloc(image_hdr.block_size+CRC_SIZE); ///alloc a memory to copy data if(buffer2 == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } memcpy(buffer2, buffer, image_hdr.block_size); memcpy(buffer2+image_hdr.block_size, crc_buffer, CRC_SIZE); memcpy(buffer, buffer2+CRC_SIZE, image_hdr.block_size); crc_ck2 = crc32(crc_ck2, buffer, r_size); c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt); if (c_size < CRC_SIZE) log_mesg(0, 1, 1, debug, "read CRC error: %s, please check your image file. \n", strerror(errno)); if ((memcmp(crc_buffer, &crc_ck2, CRC_SIZE) != 0 )&& (!opt.ignore_crc)) { log_mesg(0, 1, 1, debug, "CRC error again at %i...\n ", sf); } else { crc_ck = crc_ck2; } free(buffer2); } else { crc_ck2 = crc_ck; } if(next != next_count){ memset(cache_buffer, 0, image_hdr.block_size*next_max_count); for (next_int = 1; next_int <= next_max_count; next_int++) { next_block_id = block_id+next_int; if (pc_test_bit(next_block_id, bitmap)) { next++; } else { next_count = next; break; } next_count = next; } log_mesg(1, 0, 0, debug, "next = %i\n",next); } if ((next == next_count) &&(nx_current < next)){ memcpy(cache_buffer+(image_hdr.block_size*nx_current), buffer, image_hdr.block_size); w_size = 0; nx_current++; } if ((next == next_count) && (nx_current == next)){ #ifdef _FILE_OFFSET_BITS offset = (off_t)((block_id-next+1) * image_hdr.block_size); sf = lseek(dfw, offset, SEEK_SET); if (sf == -1) log_mesg(0, 1, 1, debug, "target seek error = %lli, ",sf); #endif /// write block from buffer to partition w_size = write_all(&dfw, cache_buffer, (image_hdr.block_size*nx_current), &opt); log_mesg(1, 0, 0, debug, "bs=%i and w=%i, ",(image_hdr.block_size*nx_current), w_size); if (w_size != (int)image_hdr.block_size*nx_current) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); next = 1; next_count = next_max_count; nx_current=0; } copied++; /// count copied block total_write += (unsigned long long) w_size; /// count copied size /// read or write error //if ((r_size != w_size) || (r_size != image_hdr.block_size)) // log_mesg(0, 1, 1, debug, "read and write different\n"); log_mesg(1, 0, 0, debug, "end\n"); } else { /// for restore to raw file, mount -o loop used. if ((block_id == (image_hdr.totalblock-1)) && (opt.restore_raw_file)){ write_last_block(&dfw, image_hdr.block_size, block_id, &opt); } else { #ifndef _FILE_OFFSET_BITS /// if the block is not used, I just skip it. log_mesg(2, 0, 0, debug, "block_id=%lli, ",block_id); sf = lseek(dfw, image_hdr.block_size, SEEK_CUR); log_mesg(2, 0, 0, debug, "seek=%lli, ",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "seek error %lli errno=%i\n", (long long)offset, (int)errno); log_mesg(2, 0, 0, debug, "end\n"); #endif } } } // end of for free(buffer); } else if (opt.dd){ sf = lseek(dfr, 0, SEEK_SET); log_mesg(1, 0, 0, debug, "seek %lli for reading data string\n",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "seek set %lli\n", sf); main_pos = lseek(dfr, 0, SEEK_CUR); log_mesg(1, 0, 0, debug, "man pos = %lli\n", main_pos); log_mesg(0, 0, 0, debug, "Total block %i\n", image_hdr.totalblock); buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } /// start clone partition to image file log_mesg(1, 0, 0, debug, "start backup data device-to-device...\n"); for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){ r_size = 0; w_size = 0; if (pc_test_bit(block_id, bitmap)){ /// if the block is used log_mesg(1, 0, 0, debug, "block_id=%lli, ",block_id); log_mesg(2, 0, 0, debug, "bitmap=%i, ",pc_test_bit(block_id, bitmap)); offset = (off_t)(block_id * image_hdr.block_size); #ifdef _FILE_OFFSET_BITS sf = lseek(dfr, offset, SEEK_SET); if (sf == -1) log_mesg(0, 1, 1, debug, "source seek error = %lli, ",sf); sf = lseek(dfw, offset, SEEK_SET); if (sf == -1) log_mesg(0, 1, 1, debug, "target seek error = %lli, ",sf); #endif /// read data from source to buffer memset(buffer, 0, image_hdr.block_size); rescue_pos = lseek(dfr, 0, SEEK_CUR); r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(3, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size != (int)image_hdr.block_size){ if ((r_size == -1) && (errno == EIO)){ if (opt.rescue){ r_size = 0; for (rescue_num = 0; rescue_num < image_hdr.block_size; rescue_num += SECTOR_SIZE){ rescue_sector(&dfr, rescue_pos + rescue_num, buffer + rescue_num, &opt); r_size+=SECTOR_SIZE; } }else log_mesg(0, 1, 1, debug, "%s", bad_sectors_warning_msg); }else log_mesg(0, 1, 1, debug, "read error: %s(%i) \n", strerror(errno), errno); } /// write buffer to target w_size = write_all(&dfw, buffer, image_hdr.block_size, &opt); log_mesg(3, 0, 0, debug, "bs=%i and w=%i, ",image_hdr.block_size, w_size); if (w_size != (int)image_hdr.block_size) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); copied++; /// count copied block total_write += (unsigned long long)(w_size); /// count copied size log_mesg(2, 0, 0, debug, "total=%lli, ", total_write); /// read or write error if (r_size != w_size) log_mesg(0, 1, 1, debug, "read and write different\n"); log_mesg(1, 0, 0, debug, "end\n"); } else { #ifndef _FILE_OFFSET_BITS /// if the block is not used, I just skip it. log_mesg(2, 0, 0, debug, "block_id=%lli, ",block_id); sf = lseek(dfr, image_hdr.block_size, SEEK_CUR); log_mesg(2, 0, 0, debug, "skip source seek=%lli, ",sf); sf = lseek(dfw, image_hdr.block_size, SEEK_CUR); log_mesg(2, 0, 0, debug, "skip target seek=%lli, ",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "clone seek error %lli errno=%i\n", (long long)offset, (int)errno); #endif } } /// end of for free(buffer); } else if (opt.domain) { log_mesg(0, 0, 0, debug, "Total block %i\n", image_hdr.totalblock); log_mesg(1, 0, 0, debug, "start writing domain log...\n"); // write domain log comment and status line dprintf(dfw, "# Domain logfile created by %s v%s\n", EXECNAME, VERSION); dprintf(dfw, "# Source: %s\n", opt.source); dprintf(dfw, "# Offset: 0x%08llX\n", opt.offset_domain); dprintf(dfw, "# current_pos current_status\n"); dprintf(dfw, "0x%08llX ?\n", opt.offset_domain + (image_hdr.totalblock * image_hdr.block_size)); dprintf(dfw, "# pos size status\n"); // start logging the used/unused areas next_block_id = 0; cmp = pc_test_bit(0, bitmap); for( block_id = 0; block_id <= image_hdr.totalblock; block_id++ ){ if (block_id < image_hdr.totalblock){ nx_current = pc_test_bit(block_id, bitmap); if (nx_current == 1) copied++; } else nx_current = -1; if (nx_current != cmp){ dprintf(dfw, "0x%08llX 0x%08llX %c\n", opt.offset_domain + (next_block_id * image_hdr.block_size), (block_id - next_block_id) * image_hdr.block_size, cmp ? '+' : '?'); next_block_id = block_id; cmp = nx_current; } // don't bother updating progress } /// end of for } done = 1; pres = pthread_join(prog_thread, &p_result); update_pui(&prog, copied, block_id, done); sync_data(dfw, &opt); print_finish_info(opt); close (dfr); /// close source close (dfw); /// close target free(bitmap); /// free bitmp close_pui(pui); printf("Cloned successfully.\n"); if(opt.debug) close_log(); #ifdef MEMTRACE muntrace(); #endif return 0; /// finish } void *thread_update_pui(void *arg){ while (done == 0) { if(!opt.quiet){ update_pui(&prog, copied, block_id, done); } sleep(opt.fresh); } pthread_exit("exit"); } partclone-0.2.51/src/ntfsclone-ng.c000066400000000000000000000260131200565264100171210ustar00rootroot00000000000000/** * ntfsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read ntfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #define NTFS_DO_NOT_CHECK_ENDIANS #define NTFS_MAX_CLUSTER_SIZE 65536 #ifdef NTFS3G #include #include #include #else #include #include #include #endif #include "partclone.h" #include "ntfsclone-ng.h" #include "progress.h" #include "fs_common.h" /// define mount flag #ifdef NTFS_MNT_RDONLY #define LIBNTFS_VER_10 1 #else #define NTFS_MNT_RDONLY 1 #define LIBNTFS_VER_9 1 #endif char *EXECNAME = "partclone.ntfs"; extern fs_cmd_opt fs_opt; ntfs_volume *ntfs; /******************************************************** * Routines for counting attributes free bits. * * Used to count and verify number of free clusters * as per ntfs volume $BitMap. * * Copied from ntfs-3g 2009.11.14 source code: * ********************************************************/ /* Below macros are 32-bit ready. */ #define BCX(x) ((x) - (((x) >> 1) & 0x77777777) - \ (((x) >> 2) & 0x33333333) - \ (((x) >> 3) & 0x11111111)) #define BITCOUNT(x) (((BCX(x) + (BCX(x) >> 4)) & 0x0F0F0F0F) % 255) static u8 *ntfs_init_lut256(void) { int i; u8 *lut; lut = (u8 *)ntfs_malloc(256); if (lut) for(i = 0; i < 256; i++) *(lut + i) = 8 - BITCOUNT(i); return lut; } #ifndef NTFS3G static s64 ntfs_attr_get_free_bits(ntfs_attr *na) { u8 *buf, *lut; s64 br = 0; s64 total = 0; s64 nr_free = 0; lut = ntfs_init_lut256(); if (!lut) return -1; buf = ntfs_malloc(65536); if (!buf) goto out; while (1) { u32 *p; br = ntfs_attr_pread(na, total, 65536, buf); if (br <= 0) break; total += br; p = (u32 *)buf + br / 4 - 1; for (; (u8 *)p >= buf; p--) { nr_free += lut[ *p & 255] + lut[(*p >> 8) & 255] + lut[(*p >> 16) & 255] + lut[(*p >> 24) ]; } switch (br % 4) { case 3: nr_free += lut[*(buf + br - 3)]; case 2: nr_free += lut[*(buf + br - 2)]; case 1: nr_free += lut[*(buf + br - 1)]; } } free(buf); out: free(lut); if (!total || br < 0) return -1; return nr_free; } /* End of ntfs-3g routines code copy */ /*********************************************************/ #endif /// open device static void fs_open(char* device){ int err; unsigned long long device_size, volume_size; ntfs = ntfs_mount(device, NTFS_MNT_RDONLY); if (!ntfs) { err = errno; log_mesg(0, 1, 1, fs_opt.debug, "%s: NOT NTFS partition, ntfs mount error %i\n", __FILE__, err); } else { if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__); }else{ if (ntfs->flags & VOLUME_IS_DIRTY) { log_mesg(0, 1, 1, fs_opt.debug, "%s: NTFS Volume '%s' is scheduled for a check or it was shutdown\nuncleanly. Please boot Windows or fix it by fsck.\n", __FILE__, device); } else { log_mesg(3, 0, 0, fs_opt.debug, "%s: NTFS Volume '%s' is clean\n", __FILE__, device); } } if (NTFS_MAX_CLUSTER_SIZE < ntfs->cluster_size) { log_mesg(0, 1, 1, fs_opt.debug, "%s: NTFS Cluster size %u is too large!\n", __FILE__, (unsigned int)ntfs->cluster_size); } else { log_mesg(3, 0, 0, fs_opt.debug, "%s: NTFS Cluster size is right!\n", __FILE__); } log_mesg(3, 0, 0, fs_opt.debug, "%s: NTFS volume version: %d.%d\n", __FILE__, ntfs->major_ver, ntfs->minor_ver); if (!ntfs_version_is_supported(ntfs)) { log_mesg(3, 0, 0, fs_opt.debug, "%s: libntfs open/mount %s as ntfs successfull\n", __FILE__, device); } else { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unknown NTFS version\n", __FILE__); } // Initialize free clusters metric #ifdef NTFS3G ntfs->free_clusters = ntfs_attr_get_free_bits(ntfs->lcnbmp_na); if ( ntfs->free_clusters < 0 || ntfs->free_clusters >= ntfs->nr_clusters) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Bad number of free (%lld) or total (%lld) clusters!\n", __FILE__, ntfs->free_clusters, ntfs->nr_clusters); } #else ntfs->nr_free_clusters = ntfs_attr_get_free_bits(ntfs->lcnbmp_na); if ( ntfs->nr_free_clusters < 0 || ntfs->nr_free_clusters >= ntfs->nr_clusters) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Bad number of free (%lld) or total (%lld) clusters!\n", __FILE__, ntfs->nr_free_clusters, ntfs->nr_clusters); } #endif device_size = ntfs_device_size_get(ntfs->dev, 1); volume_size = ntfs->nr_clusters * ntfs->cluster_size; log_mesg(3, 0, 0, fs_opt.debug, "%s: Cluster size\t: %u\n", __FILE__, (unsigned int)ntfs->cluster_size); log_mesg(3, 0, 0, fs_opt.debug, "%s: Volume size\t: %u * %u + 512 = %lli + 512 = %lli\n", __FILE__, (unsigned int)ntfs->cluster_size, (unsigned int)ntfs->nr_clusters, volume_size, (volume_size+512) ); log_mesg(3, 0, 0, fs_opt.debug, "%s: Device size\t: %u\n", __FILE__, device_size); if (device_size < volume_size) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Current NTFS volume size is bigger than the device size (%lld)!\nCorrupt partition table or incorrect device partitioning?\n", __FILE__, device_size); } } } /// close device static void fs_close(){ int ret = ntfs_umount(ntfs, 0); if (ret != 0) { log_mesg(0, 0, 1, fs_opt.debug, "%s: NTFS unmount error %i!\n", __FILE__, errno); } } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { unsigned char *ntfs_bitmap; unsigned long long current_block, used_block, free_block, pos; long long int count; unsigned long bitmap_size; int start = 0; int bit_size = 1; fs_open(device); bitmap_size = (ntfs->nr_clusters + 7) / 8; if (bitmap_size > ntfs->lcnbmp_na->data_size) { log_mesg(0, 1, 1, fs_opt.debug, "%s: calculated bitmap size (%lu) > lcnbmp_na->data_size (%llu)\n", __FILE__, bitmap_size, ntfs->lcnbmp_na->data_size); } ntfs_bitmap = (unsigned char*)malloc(bitmap_size); //ntfs_bitmap = (unsigned char*)calloc(sizeof(unsigned char), bitmap_size); if ((bitmap == NULL) || (ntfs_bitmap == NULL)) { log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap alloc error\n", __FILE__); } memset(ntfs_bitmap, 0, bitmap_size); pos = 0; used_block = 0; free_block = 0; count = ntfs_attr_pread(ntfs->lcnbmp_na, pos, bitmap_size, ntfs_bitmap); /// init progress progress_bar prog; progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); if (count == -1){ // On error and nothing has been read log_mesg(0, 1, 1, fs_opt.debug, "%s: read ntfs attr error: %s\n", __FILE__, strerror(errno)); } if (count != bitmap_size){ log_mesg(0, 1, 1, fs_opt.debug, "%s: the readed size of ntfs_attr not expected: %s\n", __FILE__, strerror(errno)); } for (current_block = 0; current_block < ntfs->nr_clusters; current_block++) { char bit; bit = ntfs_bit_get(ntfs_bitmap, current_block); if (bit == -1){ // Return -1 on error log_mesg(0, 1, 1, fs_opt.debug, "%s: check bitmap error\n", __FILE__); }else if(bit == 1){ // The value of the bit (0 or 1) pc_set_bit(current_block, bitmap); used_block++; } else { pc_clear_bit(current_block, bitmap); free_block++; } /// update progress update_pui(&prog, current_block, current_block, 0); } /// update progress update_pui(&prog, 1, 1, 1); log_mesg(3, 0, 0, fs_opt.debug, "%s: [bitmap] Used Block\t: %llu\n", __FILE__, used_block); log_mesg(3, 0, 0, fs_opt.debug, "%s: [bitmap] Free Block\t: %llu\n", __FILE__, free_block); log_mesg(3, 0, 0, fs_opt.debug, "%s: [bitmap] Calculated Bitmap Size\t: %lu\n", __FILE__, bitmap_size); log_mesg(3, 0, 0, fs_opt.debug, "%s: [bitmap] Bitmap attribute data size\t: %llu\n", __FILE__, ntfs->lcnbmp_na->data_size); log_mesg(3, 0, 0, fs_opt.debug, "%s: [bitmap] Bitmap attribute initialized size\t: %llu\n", __FILE__, ntfs->lcnbmp_na->initialized_size); log_mesg(3, 0, 0, fs_opt.debug, "%s: [bitmap] Bitmap attribute allocated size\t: %llu\n", __FILE__, ntfs->lcnbmp_na->allocated_size); free(ntfs_bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap alloc free\n", __FILE__); fs_close(); log_mesg(3, 0, 0, fs_opt.debug, "%s: fs_close done\n", __FILE__); if (used_block != image_hdr.usedblocks) { log_mesg(0, 1, 1, fs_opt.debug, "%s: used blocks count mismatch: %llu in header, %llu from readbitmap\n", __FILE__, image_hdr.usedblocks, used_block); } } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, ntfs_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = (int)ntfs->cluster_size; image_hdr->totalblock = (unsigned long long)ntfs->nr_clusters; #ifdef NTFS3G log_mesg(3, 0, 0, fs_opt.debug, "%s: ntfs - nr_free:\t: %lld\n", __FILE__, ntfs->free_clusters); image_hdr->usedblocks = (unsigned long long)(ntfs->nr_clusters - ntfs->free_clusters); #else log_mesg(3, 0, 0, fs_opt.debug, "%s: ntfs - nr_free:\t: %lld\n", __FILE__, ntfs->nr_free_clusters); image_hdr->usedblocks = (unsigned long long)(ntfs->nr_clusters - ntfs->nr_free_clusters); #endif image_hdr->device_size = (unsigned long long)ntfs_device_size_get(ntfs->dev, 1); fs_close(); log_mesg(3, 0, 0, fs_opt.debug, "%s: hdr - usedblocks:\t: %llu\n", __FILE__, image_hdr->usedblocks); log_mesg(3, 0, 0, fs_opt.debug, "%s: hdr - totalblocks:\t: %llu\n", __FILE__, image_hdr->totalblock); } partclone-0.2.51/src/ntfsclone-ng.h000066400000000000000000000013421200565264100171240ustar00rootroot00000000000000/** * ntfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read ntfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/ntfsfixboot.c000066400000000000000000000257401200565264100170770ustar00rootroot00000000000000/* ntfsfixboot - deals with braindeadness with moving NTFS filesystems. version 1.0 Copyright (C) 2009 Orgad Shaneh Loosely based on the work of Daniel J. Grace (2006) This program modifies the geometry settings on an NTFS partition as described in . It is needed for booting, as described in libntfs It will NOT work for Windows NT v3.5 and below. It is designed for NT4/2000/XP and later versions. Like any other program that tinkers with the contents of your HD, this program may cause data corruption. USE AT YOUR OWN RISK. You have been warned. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #define _LARGEFILE64_SOURCE #include #include #include #include #include #include #include #include #include #include int flip(void *p, int size) { uint16_t test; int iter; char *c; char t; if (size % 2) return 1; // Determine system architecture test = 1; c = (char *)&test; if (*c) return 0; // reverse bytes c = p; for (iter = 0 ; iter < size / 2; ++iter) { t = c[iter]; c[iter] = c[size-iter-1]; c[size-iter-1] = t; } return 0; } int usage(char *progname) { fprintf(stderr, "adjust filesystem geometry for a NTFS partition" "\nUsage: %s [-h # -t #] [-s start] [-b] [-w] [-f] [-p] device" "\nwhere device points to an NTFS partition" "\n" "\nOptions:" "\n-w:\t\tWrite new start sector to the partition." "\n-h # -t #:\tSpecify number of heads and number of sectors per track" "\n\t\tIf omitted, determined via ioctl." "\n-s start:\tNew start sector to write." "\n\t\tIf omitted, determined via ioctl." "\n-b:\t\tProceed even if the specified device is not a" "\n\t\tpartition (e.g. a regular file)" "\n-f:\t\tForce the operation to occur even if device does not look" "\n\t\tlike a valid NTFS partition or values are equal." "\n-p:\t\tPrint debug information (values read, values requested etc.)" "\n" "\nThis utility displays the current starting sector as defined by the" "\nthe filesystem. No change will actually be made without the -w" "\noption." "\n" "\nExit status:" "\n* 0 - success (values are correct, or changed successfully)" "\n* 1 - a change is needed, but -w was not specified" "\n* 2 - an error occured" "\n", progname ); return 0; } struct ntfs_geometry { uint16_t sectors; uint16_t heads; uint32_t start; } __attribute__((packed)); void flip_all(struct ntfs_geometry *geo) { flip(&geo->heads, 2); flip(&geo->sectors, 2); flip(&geo->start, 4); } char optSpecifyStart = 0, optSpecifyHS = 0, optWrite = 0, optBlock = 0, optForce = 0, optPrint = 0; char *optDeviceName = NULL; struct ntfs_geometry opt_geom = {0, 0, 0}; void print(const char *s, ...) { va_list ap; if (optPrint) { va_start(ap, s); vprintf(s, ap); va_end(ap); } } int read_options(int argc, char *argv[]) { int i; char opt; int readopts = 1; if (argc <= 1) { usage(argv[0]); return 2; } // read options for (i = 1 ; i < argc ; ++i) { if (argv[i][0] == '-' && readopts) { opt = argv[i][1]; // -h, -t and -s need a number to follow if ((opt == 'h') || (opt == 't') || (opt == 's')) { char *sizePtr, *endPtr; if (argv[i][2]) { sizePtr = &argv[i][2]; } else if (i+1 < argc) { sizePtr = argv[++i]; } else { fprintf(stderr, "ERROR: Size must be specified for option -%c\n", opt); usage(argv[0]); return 1; } switch (opt) { case 'h': optSpecifyHS = 1; opt_geom.heads = strtoul(sizePtr, &endPtr, 10); break; case 't': optSpecifyHS = 1; opt_geom.sectors = strtoul(sizePtr, &endPtr, 10); break; case 's': optSpecifyStart = 1; opt_geom.start = strtoul(sizePtr, &endPtr, 10); break; } // assert the value is a number if (endPtr == sizePtr || *endPtr) { fprintf(stderr, "ERROR: Invalid size specified for option -%c\n", opt); usage(argv[0]); return 1; } continue; } if (opt && argv[i][2]) { fprintf(stderr, "Unknown option '%s'\n", argv[i]); usage(argv[0]); return 1; } switch (opt) { case '-': readopts = 0; break; case 'b': optBlock = 1; break; case 'w': optWrite = 1; break; case 'f': optForce = 1; break; case 'p': optPrint = 1; break; default: fprintf(stderr, "Unknown option '%s'\n", argv[i]); usage(argv[0]); return 1; } continue; } // If we reach here, we're reading a device name if (optDeviceName) { fprintf(stderr, "Only one device may be specified\n"); usage(argv[0]); return 1; } optDeviceName = argv[i]; } if (!optDeviceName) { fprintf(stderr, "No device name specified\n"); usage(argv[0]); return 1; } return 0; } int main(int argc, char *argv[]) { int device = 0; int opt_res; char haveGeom = 0; uint16_t sector_size = 0; uint64_t total_sectors = 0; off64_t last_sector = 0; struct hd_geometry part_geom = {0, 0, 0, 0}; struct ntfs_geometry fs_geom = {0, 0, 0}; struct ntfs_geometry bak_geom = {0, 0, 0}; struct ntfs_geometry set_geom = {0, 0, 0}; char br_sector[512]; char bak_sector[512]; const int geomsize = sizeof(struct ntfs_geometry); puts("ntfsfixboot version 1.0"); // read program options (into global variables) opt_res = read_options(argc, argv); if (opt_res) return opt_res; // verify that we can open the device in readonly mode if ((device = open(optDeviceName, (optWrite ? O_RDWR : O_RDONLY) | O_SYNC)) < 0) { perror("open"); return 2; } // check to see if it's a partition, and determine geometry if (ioctl(device, HDIO_GETGEO, &part_geom)) { if (!optBlock) { fprintf(stderr, "Failed to read disk geometry. Perhaps this is not a partition?\n"); fprintf(stderr, "Verify that you are using the correct device or use the -b option.\n"); fprintf(stderr, "The exact error was:\n"); perror("ioctl"); return 2; } else if (!optSpecifyStart && optWrite) { fprintf(stderr, "Failed to read disk geometry, and -s option was not specified.\n"); fprintf(stderr, "No update can be made without this information.\n"); fprintf(stderr, "The exact error was:\n"); perror("ioctl"); return 2; } } else { haveGeom = 1; if (!optForce && !part_geom.start) { fprintf(stderr, "This looks like an entire disk (start=0) instead of a single partition.\n"); fprintf(stderr, "It will not be modified without the -f (force) option.\n"); if (optWrite) { return 2; } } } if (read(device, br_sector, 512) != 512) { fprintf(stderr, "Error reading device!"); perror("read"); } // verify that it is an NTFS partition // read "NTFS" magic, or at least what should be if (memcmp(br_sector + 0x03, "NTFS", 4)) { if (!optForce) { fprintf(stderr, "This device does not appear to be a real NTFS volume.\n"); if (!optWrite) { return 2; } } } // filesystem geometry memcpy(&fs_geom, br_sector + 0x18, geomsize); flip_all(&fs_geom); // backup sector memcpy(§or_size, br_sector + 0x0b, 2); memcpy(&total_sectors, br_sector + 0x28, 8); flip(§or_size, 2); flip(&total_sectors, 8); last_sector = total_sectors * sector_size; // very unlikely to happen... if (sector_size != 512) { fprintf(stderr, "Sector size is not 512. this mode is not supported!"); return 2; } if (last_sector == 0) { fprintf(stderr, "Unable to determine last (backup) sector!\n"); return 2; } if (lseek64(device, last_sector, SEEK_SET) < 0) { perror("lseek64"); return 2; } if (read(device, &bak_sector, 512) != 512) { fprintf(stderr, "Unable to read backup sector.\n"); return 2; } memcpy(&bak_geom, bak_sector + 0x18, geomsize); flip_all(&bak_geom); if (optSpecifyHS) { if (!opt_geom.heads || !opt_geom.sectors) { fprintf(stderr, "Must specify both heads and sectors per track or none!\n"); return 2; } } // behavior description follows. HS and Start values indicates SpecifyHS and SpecifyStart // part: use partition value // fs : use filesystem value (don't change anything) // opt : use user value // HS Start tgt HS tgt Start // 0 0 part part (if no partition geometry, use fs) // 0 1 fs opt // 1 0 opt part // 1 1 opt opt if (!optSpecifyHS && !optSpecifyStart) { if (haveGeom) { set_geom.heads = part_geom.heads; set_geom.sectors = part_geom.sectors; set_geom.start = part_geom.start; } else { set_geom = fs_geom; } } else { set_geom = opt_geom; if (!optSpecifyStart) { set_geom.start = part_geom.start; } if (!optSpecifyHS) { set_geom.heads = fs_geom.heads; set_geom.sectors = fs_geom.sectors; } } // print all details print("\t\tHeads\tSectors\tStart\n"); if (haveGeom) { print("partition:\t%d\t%d\t%lu\n", part_geom.heads, part_geom.sectors, part_geom.start); } print("filesystem:\t%d\t%d\t%lu\n", fs_geom.heads, fs_geom.sectors, fs_geom.start); print("backup sector\t%d\t%d\t%lu\n", bak_geom.heads, bak_geom.sectors, bak_geom.start); print("target:\t\t%d\t%d\t%lu\n", set_geom.heads, set_geom.sectors, set_geom.start); if (!memcmp(&set_geom, &fs_geom, geomsize) && !memcmp(&set_geom, &bak_geom, geomsize) && !optForce && !memcmp(br_sector, bak_sector, 512)) { puts("No changes neccessary."); return 0; } if (!optWrite) { puts("Changes will be written to disk only with -w flag"); return 1; } flip_all(&set_geom); memcpy(br_sector + 0x18, &set_geom, geomsize); // write back changes if (lseek(device, 0L, SEEK_SET) < 0) { perror("lseek"); return 2; } if (write(device, br_sector, 512) != 512) { perror("write"); return 2; } // write to backup sector if (lseek64(device, last_sector, SEEK_SET) < 0) { perror("lseek64"); return 2; } if (write(device, br_sector, 512) != 512) { perror("write"); return 2; } if (fsync(device)) { perror("fsync"); return 2; } if (close(device)) { perror("close"); return 2; } puts("done!"); return 0; } partclone-0.2.51/src/partclone.c000066400000000000000000001040001200565264100165040ustar00rootroot00000000000000 /** * partclone.c - Part of Partclone project. * * Copyright (c) 2007~ Thomas Tsai * * more functions used by main. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #define _LARGEFILE64_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gettext.h" #include #define _(STRING) gettext(STRING) //#define PACKAGE "partclone" #include "version.h" #include "partclone.h" #if defined(linux) && defined(_IO) && !defined(BLKGETSIZE) #define BLKGETSIZE _IO(0x12,96) /* Get device size in 512-byte blocks. */ #endif #if defined(linux) && defined(_IOR) && !defined(BLKGETSIZE64) #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* Get device size in bytes. */ #endif FILE* msg = NULL; #ifdef HAVE_LIBNCURSESW #include WINDOW *log_win; WINDOW *p_win; WINDOW *box_win; WINDOW *bar_win; WINDOW *tbar_win; int log_y_line = 0; #endif extern void print_readable_size_str(unsigned long long size_byte, char *new_size_str){ float new_size = 1.0; memset(new_size_str, 0, 11); uint64_t tbyte=1000000000000.0; uint64_t gbyte=1000000000; uint64_t mbyte=1000000; uint64_t kbyte=1000; if (size_byte == 0) snprintf(new_size_str, 11, "%lli", size_byte); if (size_byte >= tbyte){ new_size = (float)size_byte / (float)tbyte; snprintf(new_size_str, 11, "%5.1f TB", new_size); }else if (size_byte >= gbyte){ new_size = (float)size_byte / (float)gbyte; snprintf(new_size_str, 11, "%5.1f GB", new_size); }else if (size_byte >= mbyte){ new_size = (float)size_byte / (float)mbyte; snprintf(new_size_str, 11, "%5.1f MB", new_size); }else if (size_byte >= kbyte){ new_size = (float)size_byte / (float)kbyte; snprintf(new_size_str, 11, "%5.1f KB", new_size); }else{ snprintf(new_size_str, 11, "%3i Byte", (int)size_byte); } } /** * options - * usage - print message "how to use this" * print_version * parse_options - get parameter from agrc, argv */ extern void usage(void) { fprintf(stderr, "%s v%s http://partclone.org\nUsage: %s [OPTIONS]\n" " Efficiently clone to a image, device or standard output.\n" "\n" " -o, --output FILE Output FILE\n" " -O --overwrite FILE Output FILE, overwriting if exists\n" " -W --restore_raw_file create special raw file for loop device\n" " -s, --source FILE Source FILE\n" " -L, --logfile FILE Log FILE\n" #ifndef RESTORE " -c, --clone Save to the special image format\n" " -r, --restore Restore from the special image format\n" " -b, --dev-to-dev Local device to device copy mode\n" " -D, --domain Create ddrescue domain log from source device\n" " --offset_domain=X Add offset X (bytes) to domain log values\n" " -R, --rescue Continue after disk read errors\n" #endif " -dX, --debug=X Set the debug level to X = [0|1|2]\n" " -C, --no_check Don't check device size and free space\n" #ifdef HAVE_LIBNCURSESW " -N, --ncurses Using Ncurses User Interface\n" #endif " -I, --ignore_fschk Ignore filesystem check\n" " -i, --ignore_crc Ignore crc check error\n" " -F, --force Force progress\n" " -f, --UI-fresh Fresh times of progress\n" " -m, --max_block_cache The used block will be cache until max number\n" " -q, --quiet Disable progress message\n" " -B, --no_block_detail Show progress message without block detail\n" " -v, --version Display partclone version\n" " -h, --help Display this help\n" , EXECNAME, VERSION, EXECNAME); exit(0); } extern void print_version(void){ printf("Partclone : v%s (%s) \n", VERSION, git_version); exit(0); } enum { OPT_OFFSET_DOMAIN = 1000 }; extern void parse_options(int argc, char **argv, cmd_opt* opt) { static const char *sopt = "-hvd::L:cbrDo:O:s:f:m:RCXFINiqWB"; static const struct option lopt[] = { { "help", no_argument, NULL, 'h' }, { "print_version", no_argument, NULL, 'v' }, { "output", required_argument, NULL, 'o' }, { "overwrite", required_argument, NULL, 'O' }, { "source", required_argument, NULL, 's' }, { "restore-image", no_argument, NULL, 'r' }, { "restore_raw_file", no_argument, NULL, 'W' }, { "clone-image", no_argument, NULL, 'c' }, { "dev-to-dev", no_argument, NULL, 'b' }, { "domain", no_argument, NULL, 'D' }, { "offset_domain", required_argument, NULL, OPT_OFFSET_DOMAIN }, { "debug", optional_argument, NULL, 'd' }, { "logfile", required_argument, NULL, 'L' }, { "rescue", no_argument, NULL, 'R' }, { "UI-fresh", required_argument, NULL, 'f' }, { "max_block_cache", required_argument, NULL, 'm' }, { "check", no_argument, NULL, 'C' }, { "ignore_fschk", no_argument, NULL, 'I' }, { "ignore_crc", no_argument, NULL, 'i' }, { "force", no_argument, NULL, 'F' }, { "quiet", no_argument, NULL, 'q' }, { "no_block_detail", no_argument, NULL, 'B' }, #ifdef HAVE_LIBNCURSESW { "ncurses", no_argument, NULL, 'N' }, #endif { NULL, 0, NULL, 0 } }; int c; int mode = 0; memset(opt, 0, sizeof(cmd_opt)); opt->debug = 0; opt->rescue = 0; opt->max_block_cache = 8; opt->check = 1; opt->ignore_crc = 0; opt->quiet = 0; opt->no_block_detail = 0; opt->fresh = 2; opt->logfile = "/var/log/partclone.log"; #ifdef RESTORE opt->restore++; mode++; #endif while ((c = getopt_long(argc, argv, sopt, lopt, NULL)) != -1) { switch (c) { case 's': opt->source = optarg; break; case 'h': usage(); break; case '?': usage(); break; case 'v': print_version(); break; case 'O': opt->overwrite++; case 'o': opt->target = optarg; break; case 'r': opt->restore++; mode++; break; case 'c': opt->clone++; mode++; break; case 'b': opt->dd++; mode++; break; case 'D': opt->domain++; mode++; break; case 'd': if (optarg) opt->debug = atol(optarg); else opt->debug = 1; break; case 'm': opt->max_block_cache = atol(optarg); break; case 'L': opt->logfile = optarg; break; case 'f': opt->fresh = atol(optarg); break; case 'F': opt->force++; break; case 'I': opt->ignore_fschk++; break; case 'i': opt->ignore_crc = 1; break; case 'W': opt->restore_raw_file = 1; break; case 'q': opt->quiet = 1; break; case 'B': opt->no_block_detail = 1; break; case 'R': opt->rescue++; break; #ifdef HAVE_LIBNCURSESW case 'N': opt->ncurses = 1; break; #endif case 'C': opt->check = 0; break; case OPT_OFFSET_DOMAIN: opt->offset_domain = strtoull(optarg, NULL, 0); break; default: fprintf(stderr, "Unknown option '%s'.\n", argv[optind-1]); usage(); } } if(mode != 1) { //fprintf(stderr, ".\n") usage(); } if (!opt->debug){ opt->debug = 0; } //printf("debug %i\n", opt->debug); if ((opt->target == NULL) && (opt->source == NULL)){ fprintf(stderr, "There is no image name. or --help get more info.\n"); exit(0); } if (opt->target == NULL) { //fprintf(stderr, "You use specify output file like stdout. or --help get more info.\n"); opt->target = "-"; } if (opt->source == NULL) { //fprintf(stderr, "You use specify output file like stdout. or --help get more info.\n"); opt->source = "-"; } if (opt->clone || opt->domain){ if ((strcmp(opt->source, "-") == 0) || (opt->source == NULL)) { fprintf(stderr, "Partclone can't %s from stdin.\nFor help, type: %s -h\n", opt->clone ? "clone" : "make domain log", EXECNAME); //usage(); exit(0); } if ((strcmp(opt->target, "-") == 0) || (opt->target == NULL)) { if (opt->ncurses){ fprintf(stderr, "Warning: Partclone can't save output to stdout with ncurses interface.\n"); opt->ncurses = 0; } } } if (opt->restore){ if ((strcmp(opt->target, "-") == 0) || (opt->target == NULL)) { fprintf(stderr, "Partclone can't restore to stdout.\nFor help,type: %s -h\n", EXECNAME); //usage(); exit(0); } } } /** * Ncurses Text User Interface * open_ncurses - open text window * close_ncurses - close text window */ extern int open_ncurses(){ int debug = 1; #ifdef HAVE_LIBNCURSESW extern cmd_opt opt; int terminal_x = 0; int terminal_y = 0; initscr(); // check terminal width and height getmaxyx(stdscr, terminal_y, terminal_x); // set window position int log_line = 12; int log_row = 60; int log_y_pos = (terminal_y-24)/2+2; int log_x_pos = (terminal_x-log_row)/2; int gap = 0; int p_line = 8; int p_row = log_row; int p_y_pos = log_y_pos+log_line+gap; int p_x_pos = log_x_pos; int size_ok = 1; if(terminal_y < (log_line+gap+p_line+3)) size_ok = 0; if(terminal_x < (log_row+2)) size_ok = 0; if (size_ok == 0){ log_mesg(0, 0, 0, debug, "Terminal width(%i) or height(%i) too small\n", terminal_x, terminal_y); return 0; } /// check color pair if(!has_colors()){ log_mesg(0, 0, 0, debug, "Terminal color error\n"); return 0; } if (start_color() != OK){ log_mesg(0, 0, 0, debug, "Terminal can't start color mode\n"); return 0; } /// define color init_pair(1, COLOR_WHITE, COLOR_BLUE); ///stdscr init_pair(2, COLOR_RED, COLOR_WHITE); ///sub window init_pair(3, COLOR_BLUE, COLOR_WHITE); ///sub window /// write background color bkgd(COLOR_PAIR(1)); touchwin(stdscr); refresh(); /// init main box attrset(COLOR_PAIR(2)); box_win = subwin(stdscr, (log_line+gap+p_line+2), log_row+2, log_y_pos-1, log_x_pos-1); box(box_win, ACS_VLINE, ACS_HLINE); wbkgd(box_win, COLOR_PAIR(2)); mvprintw((log_y_pos-1), ((terminal_x-9)/2), " Partclone "); attroff(COLOR_PAIR(2)); attrset(COLOR_PAIR(3)); /// init log window log_win = subwin(stdscr, log_line, log_row, log_y_pos, log_x_pos); wbkgd(log_win, COLOR_PAIR(3)); // init progress window p_win = subwin(stdscr, p_line, p_row, p_y_pos, p_x_pos); wbkgd(p_win, COLOR_PAIR(3)); // init progress window bar_win = subwin(stdscr, 1, p_row-10, p_y_pos+4, p_x_pos); wbkgd(bar_win, COLOR_PAIR(1)); // init total block progress window tbar_win = subwin(stdscr, 1, p_row-10, p_y_pos+7, p_x_pos); //wbkgd(tbar_win, COLOR_PAIR(1)); scrollok(log_win, TRUE); if( touchwin(stdscr) == ERR ){ return 0; } //clear(); refresh(); #endif return 1; } extern void close_ncurses(){ #ifdef HAVE_LIBNCURSESW sleep(3); attroff(COLOR_PAIR(3)); delwin(log_win); delwin(p_win); delwin(bar_win); delwin(box_win); touchwin(stdscr); endwin(); #endif } /** * debug message * open_log - to open file default is /var/log/partclone.log * log_mesg - write log to the file * - write log and exit * - write to stderr... * close_log - to close file /var/log/partclone.log */ extern void open_log(char* source){ msg = fopen(source,"w"); if(msg == NULL){ fprintf(stderr, "open logfile %s error\n", source); exit(0); } } extern void log_mesg(int log_level, int log_exit, int log_stderr, int debug, const char *fmt, ...){ va_list args; va_start(args, fmt); extern cmd_opt opt; char tmp_str[512]; vsprintf(tmp_str, fmt, args); if (opt.ncurses) { #ifdef HAVE_LIBNCURSESW setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); if((log_stderr) && (log_level <= debug)){ if(log_exit){ wattron(log_win, A_STANDOUT); } wprintw(log_win, tmp_str); if(log_exit){ wattroff(log_win, A_STANDOUT); sleep(3); } wrefresh(log_win); log_y_line++; } #endif } else { /// write log to stderr if log_stderr is true if((log_stderr == 1) && (log_level <= debug)){ //vsprintf(tmp_str, fmt, args); fprintf(stderr, "%s", tmp_str); } } /// write log to logfile if debug is true if(log_level <= debug){ //vsprintf(tmp_str, fmt, args); fprintf(msg, "%s", tmp_str); //if (errno != 0) // fprintf(msg, "%s(%i), ", strerror(errno), errno); } va_end(args); /// clear message fflush(msg); /// exit if lexit true if ((!opt.force) && (log_exit)){ close_ncurses(); fprintf(stderr, "Partclone fail, please check %s !\n", opt.logfile); exit(1); } } extern void close_log(){ fclose(msg); } /** * for restore used functions * restore_image_hdr - get image_head from image file * restore_image_hdr_sp - get image_head from image file * get_image_bitmap - read bitmap data from image file */ extern void restore_image_hdr(int* ret, cmd_opt* opt, image_head* image_hdr){ int r_size; char* buffer; unsigned long long dev_size; int debug = opt->debug; buffer = (char*)malloc(sizeof(image_head)); memset(buffer, 0, sizeof(image_head)); r_size = read_all(ret, buffer, sizeof(image_head), opt); if (r_size == -1) log_mesg(0, 1, 1, debug, "read image_hdr error\n"); memcpy(image_hdr, buffer, sizeof(image_head)); free(buffer); dev_size = (unsigned long long)(image_hdr->totalblock * image_hdr->block_size); if (image_hdr->device_size != dev_size) image_hdr->device_size = dev_size; } extern void restore_image_hdr_sp(int* ret, cmd_opt* opt, image_head* image_hdr, char* first_sec){ int r_size; char* buffer; unsigned long long dev_size; int debug = opt->debug; buffer = (char*)malloc(sizeof(image_head)); memset(buffer, 0, sizeof(image_head)); memcpy(buffer, first_sec, 512); r_size = read_all(ret, (buffer+512), (sizeof(image_head)-512), opt); if (r_size == -1) log_mesg(0, 1, 1, debug, "read image_hdr error\n"); memcpy(image_hdr, buffer, sizeof(image_head)); free(buffer); dev_size = (unsigned long long)(image_hdr->totalblock * image_hdr->block_size); if (image_hdr->device_size != dev_size) image_hdr->device_size = dev_size; } /// get partition size extern unsigned long long get_partition_size(int* ret){ unsigned long long dest_size = 0; unsigned long dest_block; struct stat stat; int debug = 1; if (!fstat(*ret, &stat)) { if (S_ISFIFO(stat.st_mode)){ dest_size = 0; } else if (S_ISREG(stat.st_mode)){ dest_size = stat.st_size; } else { #ifdef BLKGETSIZE64 if (ioctl(*ret, BLKGETSIZE64, &dest_size) < 0) { log_mesg(0, 0, 0, debug, "get device size error, Use option -C to disable size checking(Dangerous).\n"); } log_mesg(1, 0, 0, debug, "get device size %lli by ioctl BLKGETSIZE64,\n", dest_size); return dest_size; #endif #ifdef BLKGETSIZE if (ioctl(*ret, BLKGETSIZE, &dest_block) >= 0) { dest_size = (unsigned long long)(dest_block * 512); } log_mesg(1, 0, 0, debug, "get block %li and device size %lli by ioctl BLKGETSIZE,\n", dest_block, dest_size); return dest_size; #endif } } else { log_mesg(0, 0, 0, debug, "fstat size error, Use option -C to disable size checking(Dangerous).\n"); } return dest_size; } /// check partition size extern int check_size(int* ret, unsigned long long size){ unsigned long long dest_size; int debug = 1; dest_size = get_partition_size(ret); if (dest_size < size){ log_mesg(0, 1, 1, debug, "Target partition size(%lli MB) is smaller than source(%lli MB). Use option -C to disable size checking(Dangerous).\n", print_size(dest_size, MBYTE), print_size(size, MBYTE)); return 1; } return 0; } /// check free space extern void check_free_space(int* ret, unsigned long long size){ unsigned long long dest_size; struct statvfs stvfs; struct stat stat; int debug = 1; if (fstatvfs(*ret, &stvfs) == -1) { printf("WARNING: Unknown free space on the destination: %s\n", strerror(errno)); return; } /* if file is a FIFO there is no point in checking the size */ if (!fstat(*ret, &stat)) { if (S_ISFIFO(stat.st_mode)) return; } else { printf("WARNING: Couldn't get file info because of the following error: %s\n", strerror(errno)); } dest_size = (unsigned long long)stvfs.f_frsize * stvfs.f_bfree; if (!dest_size) dest_size = (unsigned long long)stvfs.f_bsize * stvfs.f_bfree; if (dest_size < size) log_mesg(0, 1, 1, debug, "Destination doesn't have enough free space: %llu MB < %llu MB\n", print_size(dest_size, MBYTE), print_size(size, MBYTE)); } /// check free memory size extern int check_mem_size(image_head image_hdr, cmd_opt opt, unsigned long long *mem_size){ unsigned long long image_head_size = 0; unsigned long long bitmap_size = 0; int crc_io_size = 0; void *test_mem; image_head_size = sizeof(image_head); bitmap_size = sizeof(unsigned long)*LONGS(image_hdr.totalblock); crc_io_size = CRC_SIZE+image_hdr.block_size; *mem_size = image_head_size + bitmap_size + crc_io_size; log_mesg(0, 0, 0, 1, "we need memory: %lld bytes\nimage head %lld, bitmap %lld, crc %i bytes\n", *mem_size, image_head_size, bitmap_size, crc_io_size); test_mem = malloc(*mem_size); if (test_mem == NULL){ free(test_mem); return -1; } else { free(test_mem); } return 1; } /// get bitmap from image file to restore data extern void get_image_bitmap(int* ret, cmd_opt opt, image_head image_hdr, unsigned long* bitmap){ unsigned long long size, r_size, r_need; char buffer[4096]; unsigned long long offset = 0; unsigned long long bused = 0, bfree = 0; int i, debug = opt.debug; int err_exit = 1; size = sizeof(char)*image_hdr.totalblock; while (size > 0){ r_need = size > sizeof(buffer) ? sizeof(buffer) : size; r_size = read_all(ret, buffer, r_need, &opt); if (r_size < r_need){ log_mesg(0, 1, 1, debug, "Unable to read bitmap.\n"); } for (i = 0; i < r_need; i++){ if(buffer[i] == 1){ pc_set_bit(offset + i, bitmap); bused++; } else { pc_clear_bit(offset + i, bitmap); bfree++; } } offset += r_need; size -= r_need; } if (debug >= 2) { if(image_hdr.usedblocks != bused){ if (opt.force) err_exit = 0; else err_exit = 1; log_mesg(0, err_exit, 1, debug, "The Used Block count is different.(bitmap %lli != image_head %lli)\nTry to use --force to skip the metadata error.\n", bused, image_hdr.usedblocks); } } } /** * for open and close * open_source - open device or image or stdin * open_target - open device or image or stdout * * the data string * clone: read from device to image/stdout * restore: read from image/stdin to device * dd: read from device to device !! not complete * */ extern int check_mount(const char* device, char* mount_p){ char *real_file = NULL, *real_fsname = NULL; FILE * f; struct mntent * mnt; int isMounted = 0; int err = 0; real_file = malloc(PATH_MAX + 1); if (!real_file){ free(real_file); return -1; } real_fsname = malloc(PATH_MAX + 1); if (!real_fsname){ free(real_fsname); return -1; //err = errno; } if (!realpath(device, real_file)) err = errno; if ((f = setmntent (MOUNTED, "r")) == 0){ free(real_file); free(real_fsname); return -1; } while ((mnt = getmntent (f)) != 0) { if (!realpath(mnt->mnt_fsname, real_fsname)) continue; if (strcmp(real_file, real_fsname) == 0) { isMounted = 1; strcpy(mount_p, mnt->mnt_dir); } } endmntent (f); free(real_file); free(real_fsname); return isMounted; } extern int open_source(char* source, cmd_opt* opt){ int ret; int debug = opt->debug; char *mp; int flags = O_RDONLY | O_LARGEFILE; log_mesg(1, 0, 0, debug, "open source file/device %s\n", source); if((opt->clone) || (opt->dd) || (opt->domain)){ /// always is device, clone from device=source mp = malloc(PATH_MAX + 1); if (check_mount(source, mp) == 1){ log_mesg(0, 0, 1, debug, "device (%s) is mounted at %s\n", source, mp); free(mp); log_mesg(0, 1, 1, debug, "error exit\n"); } free(mp); ret = open(source, flags, S_IRUSR); if (ret == -1) log_mesg(0, 1, 1, debug, "clone: open %s error\n", source); } else if(opt->restore) { if (strcmp(source, "-") == 0){ ret = fileno(stdin); if (ret == -1) log_mesg(0, 1, 1, debug,"restore: open %s(stdin) error\n", source); } else { ret = open (source, flags, S_IRWXU); if (ret == -1) log_mesg(0, 1, 1, debug, "restore: open %s error\n", source); } } return ret; } extern int open_target(char* target, cmd_opt* opt){ int ret; int debug = opt->debug; char *mp; int flags = O_WRONLY | O_LARGEFILE; struct stat st_dev; log_mesg(1, 0, 0, debug, "open target file/device\n"); if (opt->clone || opt->domain){ if (strcmp(target, "-") == 0){ ret = fileno(stdout); if (ret == -1) log_mesg(0, 1, 1, debug, "clone: open %s(stdout) error\n", target); } else { flags |= O_CREAT | O_TRUNC; /// new file if (!opt->overwrite) /// overwrite flags |= O_EXCL; ret = open (target, flags, S_IRUSR|S_IWUSR); if (ret == -1){ if (errno == EEXIST){ log_mesg(0, 0, 1, debug, "Output file '%s' already exists.\nUse option --overwrite if you want to replace its content.\n", target); } log_mesg(0, 0, 1, debug, "open target fail %s: %s (%i)\n", target, strerror(errno), errno); } } } else if((opt->restore) || (opt->dd)){ /// always is device, restore to device=target /// check mounted mp = malloc(PATH_MAX + 1); if (check_mount(target, mp) == 1){ log_mesg(0, 0, 1, debug, "device (%s) is mounted at %s\n", target, mp); free(mp); log_mesg(0, 1, 1, debug, "error exit\n"); } free(mp); /// check block device stat(target, &st_dev); if (!S_ISBLK(st_dev.st_mode)){ log_mesg(1, 0, 1, debug, "Warning, did you restore to non-block device(%s)?\n", target); flags |= O_CREAT; /// new file if (!opt->overwrite) /// overwrite flags |= O_EXCL; } ret = open (target, flags, S_IRUSR); if (ret == -1){ if (errno == EEXIST){ log_mesg(0, 0, 1, debug, "Output file '%s' already exists.\nUse option --overwrite if you want to replace its content.\n", target); } log_mesg(0, 0, 1, debug, "%s,%s,%i: open %s error(%i)\n", __FILE__, __func__, __LINE__, target, errno); } } return ret; } /// the io function, reference from ntfsprogs(ntfsclone). extern int io_all(int *fd, char *buf, unsigned long long count, int do_write, cmd_opt* opt) { long long int i; int debug = opt->debug; unsigned long long size = count; // for sync I/O buffer, when use stdin or pipe. while (count > 0) { if (do_write) i = write(*fd, buf, count); else i = read(*fd, buf, count); if (i < 0) { log_mesg(1, 0, 1, debug, "%s: errno = %i(%s)\n",__func__, errno, strerror(errno)); if (errno != EAGAIN && errno != EINTR){ return -1; } } else if (i == 0){ log_mesg(1, 0, 1, debug, "%s: nothing to read. errno = %i(%s)\n",__func__, errno, strerror(errno)); return 0; } else { count -= i; buf = i + (char *) buf; log_mesg(2, 0, 0, debug, "%s: read %lli, %lli left.\n",__func__, i, count); } } return size; } extern void sync_data(int fd, cmd_opt* opt) { log_mesg(0, 0, 1, opt->debug, "Syncing... "); if (fsync(fd) && errno != EINVAL) log_mesg(0, 1, 1, opt->debug, "fsync error: errno = %i\n", errno); log_mesg(0, 0, 1, opt->debug, "OK!\n"); } extern void rescue_sector(int *fd, unsigned long long pos, char *buff, cmd_opt *opt) { const char *badsector_magic = "BADSECTOR\0"; if (lseek(*fd, pos, SEEK_SET) == (off_t)-1){ log_mesg(0, 0, 1, opt->debug, "WARNING: lseek error at %lli\n", pos); memset(buff, '?', SECTOR_SIZE); memmove(buff, badsector_magic, sizeof(badsector_magic)); return; } if (io_all(fd, buff, SECTOR_SIZE, 0, opt) == -1) { /// read_all log_mesg(0, 0, 1, opt->debug, "WARNING: Can't read sector at %llu, lost data.\n", (unsigned long long)pos); memset(buff, '?', SECTOR_SIZE); memmove(buff, badsector_magic, sizeof(badsector_magic)); } } /// the crc32 function, reference from libcrc. /// Author is Lammert Bies 1999-2007 /// Mail: info@lammertbies.nl /// http://www.lammertbies.nl/comm/info/nl_crc-calculation.html /// generate crc32 code extern unsigned long crc32(unsigned long crc, char *buf, int size){ unsigned long crc_tab32[256]; unsigned long init_crc, init_p; unsigned long tmp, long_c; int i, j, init = 0, s = 0 ; char c; init_p = 0xEDB88320L; do{ memcpy(&c, buf, sizeof(char)); s = s + sizeof(char); /// initial crc table if (init == 0){ for (i=0; i<256; i++) { init_crc = (unsigned long) i; for (j=0; j<8; j++) { if ( init_crc & 0x00000001L ) init_crc = ( init_crc >> 1 ) ^ init_p; else init_crc = init_crc >> 1; } crc_tab32[i] = init_crc; } init = 1; } /// update crc long_c = 0x000000ffL & (unsigned long) c; tmp = crc ^ long_c; crc = (crc >> 8) ^ crc_tab32[ tmp & 0xff ]; }while(s < size); return crc; } /// print options to log file extern void print_opt(cmd_opt opt){ int debug = opt.debug; if (opt.clone) log_mesg(1, 0, 0, debug, "MODE: clone\n"); else if (opt.restore) log_mesg(1, 0, 0, debug, "MODE: restore\n"); else if (opt.dd) log_mesg(1, 0, 0, debug, "MODE: device to device\n"); else if (opt.domain) log_mesg(1, 0, 0, debug, "MODE: create domain log for ddrescue\n"); log_mesg(1, 0, 0, debug, "DEBUG: %i\n", opt.debug); log_mesg(1, 0, 0, debug, "SOURCE: %s\n", opt.source); log_mesg(1, 0, 0, debug, "TARGET: %s\n", opt.target); log_mesg(1, 0, 0, debug, "OVERWRITE: %i\n", opt.overwrite); log_mesg(1, 0, 0, debug, "RESCUE: %i\n", opt.rescue); log_mesg(1, 0, 0, debug, "CHECK: %i\n", opt.check); log_mesg(1, 0, 0, debug, "QUIET: %i\n", opt.quiet); log_mesg(1, 0, 0, debug, "FRESH: %i\n", opt.fresh); log_mesg(1, 0, 0, debug, "FORCE: %i\n", opt.force); log_mesg(1, 0, 0, debug, "MAX BLOCK CACHE: %i\n", opt.max_block_cache); #ifdef HAVE_LIBNCURSESW log_mesg(1, 0, 0, debug, "NCURSES: %i\n", opt.ncurses); #endif log_mesg(1, 0, 0, debug, "OFFSET DOMAIN: 0x%llX\n", opt.offset_domain); } /// print partclone info extern void print_partclone_info(cmd_opt opt){ int debug = opt.debug; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); //log_mesg(0, 0, 0, "%s v%s \n", EXEC_NAME, VERSION); log_mesg(0, 0, 1, debug, _("Partclone v%s http://partclone.org\n"), VERSION); if (opt.chkimg) log_mesg(0, 0, 1, debug, _("Starting to check image (%s)\n"), opt.source); else if (opt.clone) log_mesg(0, 0, 1, debug, _("Starting to clone device (%s) to image (%s)\n"), opt.source, opt.target); else if(opt.restore) log_mesg(0, 0, 1, debug, _("Starting to restore image (%s) to device (%s)\n"), opt.source, opt.target); else if(opt.dd) log_mesg(0, 0, 1, debug, _("Starting to back up device(%s) to device(%s)\n"), opt.source, opt.target); else if (opt.domain) log_mesg(0, 0, 1, debug, _("Starting to map device (%s) to domain log (%s)\n"), opt.source, opt.target); else log_mesg(0, 0, 1, debug, "unknow mode\n"); } /// print image head extern void print_image_hdr_info(image_head image_hdr, cmd_opt opt){ int block_s = image_hdr.block_size; unsigned long long total = image_hdr.totalblock; unsigned long long used = image_hdr.usedblocks; unsigned long long dev_size = image_hdr.device_size; int debug = opt.debug; char size_str[11]; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); log_mesg(0, 0, 1, debug, _("File system: %s\n"), image_hdr.fs); print_readable_size_str(total*block_s, size_str); log_mesg(0, 0, 1, debug, _("Device size: %s = %lld Blocks\n"), size_str, total, (unsigned long long)(total*block_s)); print_readable_size_str(used*block_s, size_str); log_mesg(0, 0, 1, debug, _("Space in use: %s = %lld Blocks\n"), size_str, used, (unsigned long long)(used*block_s)); print_readable_size_str((total-used)*block_s, size_str); log_mesg(0, 0, 1, debug, _("Free Space: %s = %lld Blocks\n"), size_str, (total-used), (unsigned long long)((total-used)*block_s)); log_mesg(0, 0, 1, debug, _("Block size: %i Byte\n"), block_s); //log_mesg(0, 0, 1, debug, _("Used block : %lli\n"), used); } /// print finish message extern void print_finish_info(cmd_opt opt){ int debug = opt.debug; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); if (opt.chkimg) log_mesg(0, 0, 1, debug, _("Partclone successfully checked the image (%s)\n"), opt.source); else if (opt.clone) log_mesg(0, 0, 1, debug, _("Partclone successfully cloned the device (%s) to the image (%s)\n"), opt.source, opt.target); else if(opt.restore) log_mesg(0, 0, 1, debug, _("Partclone successfully restored the image (%s) to the device (%s)\n"), opt.source, opt.target); else if(opt.dd) log_mesg(0, 0, 1, debug, _("Partclone successfully cloned the device (%s) to the device (%s)\n"), opt.source, opt.target); else if (opt.domain) log_mesg(0, 0, 1, debug, _("Partclone successfully mapped the device (%s) to the domain log (%s)\n"), opt.source, opt.target); } /// block_count static unsigned long long block_count(unsigned long long partition_size, int block_size){ unsigned long long blocks; int sectors; blocks = partition_size / block_size; sectors = partition_size % block_size; if (sectors) return (blocks+1); else return blocks; } /// initial dd hdr extern void initial_dd_hdr(int ret, image_head* image_hdr){ memset(image_hdr, 0, sizeof(image_head)); strncpy(image_hdr->fs, raw_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = 512; image_hdr->device_size = get_partition_size(&ret); image_hdr->totalblock = block_count(image_hdr->device_size, image_hdr->block_size); image_hdr->usedblocks = image_hdr->totalblock; } /// initial bitmap extern void dd_bitmap(image_head image_hdr, unsigned long* bitmap){ int block; /// initial image bitmap as 1 (all block are used) memset(bitmap, 0xFF, sizeof(unsigned long)*LONGS(image_hdr.totalblock)); } /// write last block void write_last_block(int* dfw, int size, unsigned long long id, cmd_opt* opt){ char* buffer; int st; off_t sf; sf = lseek(*dfw, (size*id), SEEK_SET); buffer = (char*)malloc(size); memset(buffer, 0, size); st = io_all(dfw, buffer, size, 1, opt); log_mesg(1, 0, 0, opt->debug, "write last block%lli, size %i ,status %i\n", id, size, st); } partclone-0.2.51/src/partclone.h000066400000000000000000000116411200565264100165210ustar00rootroot00000000000000/** * partclone.h - Part of Partclone project. * * Copyright (c) 2007~ Thomas Tsai * * function and structure used by main. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include "bitmap.h" #define IMAGE_MAGIC "partclone-image" #define IMAGE_MAGIC_SIZE 15 #define FS_MAGIC_SIZE 15 #define reiserfs_MAGIC "REISERFS" #define reiser4_MAGIC "REISER4" #define xfs_MAGIC "XFS" #define extfs_MAGIC "EXTFS" #define ext2_MAGIC "EXT2" #define ext3_MAGIC "EXT3" #define ext4_MAGIC "EXT4" #define hfsplus_MAGIC "HFS Plus" #define fat_MAGIC "FAT" #define exfat_MAGIC "EXFAT" #define ntfs_MAGIC "NTFS" #define ufs_MAGIC "UFS" #define vmfs_MAGIC "VMFS" #define jfs_MAGIC "JFS" #define btrfs_MAGIC "BTRFS" #define raw_MAGIC "raw" #define IMAGE_VERSION "0001" #define VERSION_SIZE 4 #define SECTOR_SIZE 512 #define CRC_SIZE 4 // Reference: ntfsclone.c #define KBYTE (1000) #define MBYTE (1000 * 1000) #define GBYTE (1000 * 1000 * 1000) #define print_size(a, b) (((a) + (b - 1)) / (b)) // define read and write #define read_all(f, b, s, o) io_all((f), (b), (s), 0, (o)) #define write_all(f, b, s, o) io_all((f), (b), (s), 1, (o)) // progress flag #define BITMAP 1 #define IO 2 #define NO_BLOCK_DETAIL 3 char *EXECNAME; /** * option * structure smd_opt * usage - print message "how to use this" * parse_options - get parameter from agrc, argv */ struct cmd_opt { int clone; int restore; int dd; int domain; int chkimg; int info; int debug; char* source; char* target; char* logfile; int overwrite; int rescue; int check; int max_block_cache; int ncurses; int force; int ignore_fschk; int ignore_crc; int quiet; int no_block_detail; int restore_raw_file; unsigned long fresh; unsigned long long offset_domain; }; typedef struct cmd_opt cmd_opt; extern void usage(void); extern void parse_options(int argc, char **argv, cmd_opt* opt); /** * Ncurses Text User Interface * open_ncurses - open text window * close_ncurses - close text window */ extern int open_ncurses(); extern void close_ncurses(); /** * debug message * open_log - to open file /var/log/partclone.log * log_mesg - write log to the file * - write log and exit * - write to stderr... */ extern void open_log(char* source); extern void log_mesg(int lerrno, int lexit, int only_debug, int debug, const char *fmt, ...); extern void close_log(); extern int io_all(int *fd, char *buffer, unsigned long long count, int do_write, cmd_opt *opt); extern void sync_data(int fd, cmd_opt* opt); extern void rescue_sector(int *fd, unsigned long long pos, char *buff, cmd_opt *opt); /** * for restore used functions * restore_image_hdr - get image_head from image file * get_image_bitmap - read bitmap data from image file */ struct image_head { char magic[IMAGE_MAGIC_SIZE]; char fs[FS_MAGIC_SIZE]; char version[VERSION_SIZE]; int block_size; unsigned long long device_size; unsigned long long totalblock; unsigned long long usedblocks; char buff[4096]; }; typedef struct image_head image_head; extern void restore_image_hdr(int* ret, cmd_opt* opt, image_head* image_hdr); extern void restore_image_hdr_sp(int* ret, cmd_opt* opt, image_head* image_hdr, char* first_sec); extern void get_image_hdr(int* ret, cmd_opt opt, image_head image_hdr, unsigned long* bitmap); /** * for open and close * open_source - open device or image or stdin * open_target - open device or image or stdout * * the data string * clone: read from device to image/stdout * restore: read from image/stdin to device * dd: read from device to device !! not complete * */ extern int open_source(char* source, cmd_opt* opt); extern int open_target(char* target, cmd_opt* opt); /// check partition size extern int check_size(int* ret, unsigned long long size); /// check free space extern void check_free_space(int* ret, unsigned long long size); /// check free memory size extern int check_mem_size(image_head image_hdr, cmd_opt opt, unsigned long long *mem_size); /// generate crc32 code extern unsigned long crc32(unsigned long crc, char *buf, int size); /// print partclone info extern void print_partclone_info(cmd_opt opt); /// print image_head extern void print_image_hdr_info(image_head image_hdr, cmd_opt opt); /// print option extern void print_opt(cmd_opt opt); /// print finish mesg extern void print_finish_info(cmd_opt opt); /// initial dd hdr extern void initial_dd_hdr(int ret, image_head* image_hdr); /// initial bitmap extern void dd_bitmap(image_head image_hdr, unsigned long* bitmap); partclone-0.2.51/src/progress.c000066400000000000000000000223551200565264100163750ustar00rootroot00000000000000/** * progress.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * progress bar * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include "config.h" #include "progress.h" #include "gettext.h" #define _(STRING) gettext(STRING) #include "partclone.h" #ifdef HAVE_LIBNCURSESW #include extern WINDOW *p_win; extern WINDOW *bar_win; extern WINDOW *tbar_win; int color_support = 1; #endif int PUI; unsigned long RES=0; /// initial progress bar extern void progress_init(struct progress_bar *prog, int start, unsigned long long stop, unsigned long long total, int flag, int size) { memset(prog, 0, sizeof(progress_bar)); prog->start = start; prog->stop = stop; prog->total = total; prog->unit = 100.0 / (stop - start); prog->total_unit = 100.0 / (total - start); prog->initial_time = time(0); prog->resolution_time = time(0); prog->interval_time = 1; prog->block_size = size; if (RES){ prog->interval_time = RES; } prog->rate = 0.0; prog->pui = PUI; prog->flag = flag; } /// open progress interface extern int open_pui(int pui, unsigned long res){ int tui = 0; if (pui == NCURSES){ tui = open_ncurses(); if (tui == 0){ close_ncurses(); } } else if (pui == DIALOG){ tui = 1; } PUI = pui; RES = res; return tui; } /// close progress interface extern void close_pui(int pui){ if (pui == NCURSES){ close_ncurses(); } } extern void update_pui(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done){ if (done != 1) { if ((difftime(time(0), prog->resolution_time) < prog->interval_time) && copied != 0) return; } if (prog->pui == NCURSES) Ncurses_progress_update(prog, copied, current, done); else if (prog->pui == TEXT) progress_update(prog, copied, current, done); } static void calculate_speed(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done, prog_stat_t *prog_stat){ char *format = "%H:%M:%S"; uint64_t speedps = 1; uint64_t speed = 1; double dspeed = 1.0; float percent = 1.0; time_t remained; time_t elapsed; char Rformated[10], Eformated[10]; char speed_unit[] = " "; struct tm *Rtm, *Etm; uint64_t gbyte=1000000000.0; uint64_t mbyte=1000000; uint64_t kbyte=1000; percent = prog->unit * copied; if (percent <= 0) percent = 1; else if (percent >= 100) percent = 99.99; elapsed = (time(0) - prog->initial_time); if (elapsed <= 0) elapsed = 1; speedps = prog->block_size * copied / elapsed; speed = speedps * 60.0; prog_stat->percent = percent; if (speed >= gbyte){ dspeed = (double)speed / (double)gbyte; strncpy(speed_unit, "GB", 3); strncpy(prog_stat->speed_unit, speed_unit, 3); }else if (speed >= mbyte){ dspeed = (double)speed / (double)mbyte; strncpy(speed_unit, "MB", 3); strncpy(prog_stat->speed_unit, speed_unit, 3); }else if (speed >= kbyte){ dspeed = (double)speed / (double)kbyte; strncpy(speed_unit, "KB", 3); strncpy(prog_stat->speed_unit, speed_unit, 3); }else{ dspeed = speed; strncpy(speed_unit, "byte", 5); strncpy(prog_stat->speed_unit, speed_unit, 5); } prog_stat->total_percent = prog->total_unit * current; prog_stat->speed = dspeed; if (done != 1){ remained = (time_t)((elapsed/percent*100) - elapsed); if ((unsigned int)remained > 86400){ sprintf(Rformated," > %3i hrs ", ((int)remained/3600)); }else{ Rtm = gmtime(&remained); strftime(Rformated, sizeof(Rformated), format, Rtm); } if ((unsigned int)elapsed > 86400){ sprintf(Eformated,"> %3i hrs ", ((int)elapsed/3600)); }else{ Etm = gmtime(&elapsed); strftime(Eformated, sizeof(Eformated), format, Etm); } } else { prog_stat->percent=100; remained = (time_t)0; Rtm = gmtime(&remained); strftime(Rformated, sizeof(Rformated), format, Rtm); if ((unsigned int)elapsed > 86400){ sprintf(Eformated," > %3i hrs ", ((int)elapsed/3600)); }else{ Etm = gmtime(&elapsed); strftime(Eformated, sizeof(Eformated), format, Etm); } } strncpy(prog_stat->Eformated, Eformated, 10); strncpy(prog_stat->Rformated, Rformated, 10); } /// update information at progress bar extern void progress_update(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done) { char clear_buf = ' '; prog_stat_t prog_stat; memset(&prog_stat, 0, sizeof(prog_stat_t)); calculate_speed(prog, copied, current, done, &prog_stat); if (done != 1){ prog->resolution_time = time(0); setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s, Completed: %6.2f%%"), clear_buf, prog_stat.Eformated, prog_stat.Rformated, prog_stat.percent); if((prog->flag == IO) || (prog->flag == NO_BLOCK_DETAIL)) fprintf(stderr, _(", %6.2f%s/min,"), prog_stat.speed, prog_stat.speed_unit); if(prog->flag == IO) fprintf(stderr, "\n\r%80c\rcurrent block: %10lld, total block: %10lld, Complete: %6.2f%%%s\r", clear_buf, current, prog->total, prog_stat.total_percent, "\x1b[A"); } else { setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); fprintf(stderr, _("\r%80c\rElapsed: %s, Remaining: %s, Completed: 100.00%%"), clear_buf, prog_stat.Eformated, prog_stat.Rformated); if((prog->flag == IO) || (prog->flag == NO_BLOCK_DETAIL)) fprintf(stderr, _(", Rate: %6.2f%s/min,"), prog_stat.speed, prog_stat.speed_unit); if(prog->flag == IO) fprintf(stderr, "\n\r%80c\rcurrent block: %10lld, total block: %10lld, Complete: 100.00%%\r", clear_buf, current, prog->total); fprintf(stderr, _("\nTotal Time: %s, "), prog_stat.Eformated); if(prog->flag == IO) fprintf(stderr, _("Ave. Rate: %6.1f%s/min, "), prog_stat.speed, prog_stat.speed_unit); fprintf(stderr, _("%s"), "100.00% completed!\n"); } } /// update information at ncurses mode extern void Ncurses_progress_update(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done) { #ifdef HAVE_LIBNCURSESW char *p_block, *t_block; prog_stat_t prog_stat; memset(&prog_stat, 0, sizeof(prog_stat_t)); calculate_speed(prog, copied, current, done, &prog_stat); /// set bar color init_pair(4, COLOR_RED, COLOR_RED); init_pair(5, COLOR_WHITE, COLOR_BLUE); init_pair(6, COLOR_WHITE, COLOR_RED); werase(p_win); werase(bar_win); if (done != 1){ prog->resolution_time = time(0); mvwprintw(p_win, 0, 0, _("Elapsed: %s Remaining: %s ") , prog_stat.Eformated, prog_stat.Rformated); if((prog->flag == IO) || (prog->flag == NO_BLOCK_DETAIL)) mvwprintw(p_win, 0, 40, _("Rate: %6.2f%s/min"), prog_stat.speed, prog_stat.speed_unit); if (prog->flag == IO) mvwprintw(p_win, 1, 0, _("Current Block: %lld Total Block: %lld ") , current, prog->total); p_block = calloc(sizeof(char), 50); t_block = calloc(sizeof(char), 50); memset(p_block, ' ', (size_t)(prog_stat.percent*0.5)); memset(t_block, ' ', (size_t)(prog_stat.total_percent*0.5)); if (prog->flag == IO) mvwprintw(p_win, 3, 0, "Data Block Process:"); else if (prog->flag == BITMAP) mvwprintw(p_win, 3, 0, "Calculating Bitmap Process:"); wattrset(bar_win, COLOR_PAIR(4)); mvwprintw(bar_win, 0, 0, "%s", p_block); wattroff(bar_win, COLOR_PAIR(4)); mvwprintw(p_win, 4, 52, "%6.2f%%", prog_stat.percent); if (prog->flag == IO) { werase(tbar_win); mvwprintw(p_win, 6, 0, "Total Block Process:"); wattrset(tbar_win, COLOR_PAIR(4)); mvwprintw(tbar_win, 0, 0, "%s", t_block); wattroff(tbar_win, COLOR_PAIR(4)); mvwprintw(p_win, 7, 52, "%6.2f%%", prog_stat.total_percent); } free(p_block); free(t_block); wrefresh(p_win); wrefresh(bar_win); wrefresh(tbar_win); } else { mvwprintw(p_win, 0, 0, _("Total Time: %s Remaining: %s "), prog_stat.Eformated, prog_stat.Rformated); if((prog->flag == IO) || (prog->flag == NO_BLOCK_DETAIL)) mvwprintw(p_win, 1, 0, _("Ave. Rate: %6.2f%s/min"), prog_stat.speed, prog_stat.speed_unit); if (prog->flag == IO) mvwprintw(p_win, 3, 0, "Data Block Process:"); else if (prog->flag == BITMAP) mvwprintw(p_win, 3, 0, "Calculating Bitmap Process:"); wattrset(bar_win, COLOR_PAIR(4)); mvwprintw(bar_win, 0, 0, "%50s", " "); wattroff(bar_win, COLOR_PAIR(4)); mvwprintw(p_win, 4, 52, "100.00%%"); if (prog->flag == IO) { werase(tbar_win); mvwprintw(p_win, 6, 0, "Total Block Process:"); wattrset(tbar_win, COLOR_PAIR(4)); mvwprintw(tbar_win, 0, 0, "%50s", " "); wattroff(tbar_win, COLOR_PAIR(4)); mvwprintw(p_win, 7, 52, "100.00%%"); } wrefresh(p_win); wrefresh(bar_win); wrefresh(tbar_win); refresh(); sleep(1); } #endif } partclone-0.2.51/src/progress.h000066400000000000000000000035631200565264100164020ustar00rootroot00000000000000/** * progress.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * progress bar * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include //#include // progress display mode #define TEXT 0 #define NCURSES 1 #define DIALOG 2 /// the progress bar structure struct progress_bar { int start; unsigned long long stop; unsigned long long total; unsigned long long resolution; int block_size; float rate; time_t initial_time; time_t resolution_time; time_t interval_time; float unit; float total_unit; int pui; int flag; }; typedef struct progress_bar progress_bar; struct prog_stat_t{ char Eformated[10]; char Rformated[10]; float percent; float total_percent; float speed; char speed_unit[5]; }; typedef struct prog_stat_t prog_stat_t; extern int open_pui(int pui, unsigned long res); extern void close_pui(int pui); static void calculate_speed(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done, prog_stat_t *prog_stat); extern void update_pui(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done); /// initial progress bar extern void progress_init(struct progress_bar *prog, int start, unsigned long long stop, unsigned long long total, int flag, int size); /// update number extern void progress_update(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done); extern void Ncurses_progress_update(struct progress_bar *prog, unsigned long long copied, unsigned long long current, int done); static open_p_ncurses(); static close_p_ncurses(); partclone-0.2.51/src/reiser4clone.c000066400000000000000000000116641200565264100171300ustar00rootroot00000000000000/** * reiser4clone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiserfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "partclone.h" #include "reiser4clone.h" #include "progress.h" #include "fs_common.h" aal_device_t *fs_device; reiser4_fs_t *fs = NULL; reiser4_format_t *format; char *EXECNAME = "partclone.reiser4"; extern fs_cmd_opt fs_opt; /// open device static void fs_open(char* device){ unsigned long long int state, extended; if (libreiser4_init()) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Can't initialize libreiser4.\n", __FILE__); } if (!(fs_device = aal_device_open(&file_ops, device, 512, O_RDONLY))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Cannot open the partition (%s).\n", __FILE__, device); } if (!(fs = reiser4_fs_open(fs_device, 0))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Can't open reiser4 on %s\n", __FILE__, device); } //reiser4_opset_profile(fs->tree->ent.opset); if (!(fs->journal = reiser4_journal_open(fs, fs_device))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Can't open journal on %s", __FILE__, device); } state = get_ss_status(STATUS(fs->status)); extended = get_ss_extended(STATUS(fs->status)); if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__); }else{ if (!state) log_mesg(0, 1, 1, fs_opt.debug, "%s: REISER4 can't get status\n", __FILE__); if (state) log_mesg(3, 0, 0, fs_opt.debug, "%s: REISER4 stat : %i\n", __FILE__, state); if (state != FS_OK) log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__); if (extended) log_mesg(3, 0, 0, fs_opt.debug, "%s: Extended status: %0xllx\n", extended, __FILE__); } //reiser4_opset_profile(fs->tree->ent.opset); fs->format = reiser4_format_open(fs); } /// close device static void fs_close(){ reiser4_fs_close(fs); aal_device_close(fs_device); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { reiser4_bitmap_t *fs_bitmap; unsigned long long bit, block, bused = 0, bfree = 0; int start = 0; int bit_size = 1; fs_open(device); fs_bitmap = reiser4_bitmap_create(reiser4_format_get_len(fs->format)); reiser4_alloc_extract(fs->alloc, fs_bitmap); /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); for(bit = 0; bit < reiser4_format_get_len(fs->format); bit++){ block = bit ; if(reiser4_bitmap_test(fs_bitmap, bit)){ bused++; pc_set_bit(block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap is used %lli", block, __FILE__); } else { pc_clear_bit(block, bitmap); bfree++; log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap is free %lli", block, __FILE__); } /// update progress update_pui(&prog, bit, bit, 0); } if(bfree != reiser4_format_get_free(fs->format)) log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap free count err, bfree:%lli, sfree=%lli\n", __FILE__, bfree, reiser4_format_get_free(fs->format)); fs_close(); /// update progress update_pui(&prog, 1, 1, 1); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { reiser4_bitmap_t *fs_bitmap; unsigned long long free_blocks=0; fs_open(device); fs_bitmap = reiser4_bitmap_create(reiser4_format_get_len(fs->format)); reiser4_alloc_extract(fs->alloc, fs_bitmap); free_blocks = reiser4_format_get_free(fs->format); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, reiser4_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = (int)get_ms_blksize(SUPER(fs->master)); image_hdr->totalblock = (unsigned long long)reiser4_format_get_len(fs->format); image_hdr->usedblocks = (unsigned long long)(reiser4_format_get_len(fs->format) - free_blocks); image_hdr->device_size =(unsigned long long)(image_hdr->block_size * image_hdr->totalblock); fs_close(); } partclone-0.2.51/src/reiser4clone.h000066400000000000000000000013501200565264100171240ustar00rootroot00000000000000/** * reiser4clone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiser4 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/reiserfsclone.c000066400000000000000000000072301200565264100173670ustar00rootroot00000000000000/** * reiserfsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiserfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "partclone.h" #include "reiserfsclone.h" #include "progress.h" #include "fs_common.h" dal_t *dal; reiserfs_fs_t *fs; char *EXECNAME = "partclone.reiserfs"; extern fs_cmd_opt fs_opt; /// open device static void fs_open(char* device){ if (!(dal = (dal_t*)file_dal_open(device, DEFAULT_BLOCK_SIZE, O_RDONLY))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Couldn't create device abstraction for %s.\n", __FILE__, device); } if (!(fs = reiserfs_fs_open(dal, dal))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Couldn't open filesystem on %s.\n", __FILE__, device); } if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__); }else{ if (get_sb_umount_state(fs->super) != FS_CLEAN) log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__); } } /// close device static void fs_close(){ reiserfs_fs_close(fs); file_dal_close(dal); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { reiserfs_bitmap_t *fs_bitmap; reiserfs_tree_t *tree; reiserfs_block_t *node; unsigned long long blk = 0; unsigned long long bused = 0, bfree = 0; int start = 0; int bit_size = 1; int done = 0; fs_open(device); tree = reiserfs_fs_tree(fs); fs_bitmap = tree->fs->bitmap; /// init progress progress_bar bprog; /// progress_bar structure defined in progress.h progress_init(&bprog, start, fs->super->s_v1.sb_block_count, fs->super->s_v1.sb_block_count, BITMAP, bit_size); for( blk = 0; blk < (unsigned long long)fs->super->s_v1.sb_block_count; blk++ ){ log_mesg(3, 0, 0, fs_opt.debug, "%s: block sb_block_count %llu\n", __FILE__, fs->super->s_v1.sb_block_count); log_mesg(3, 0, 0, fs_opt.debug, "%s: block bitmap check %llu\n", __FILE__, blk); if(reiserfs_tools_test_bit(blk, fs_bitmap->bm_map)){ bused++; pc_set_bit(blk, bitmap); }else{ bfree++; pc_clear_bit(blk, bitmap); } /// update progress update_pui(&bprog, blk, blk, done); } if(bfree != fs->super->s_v1.sb_free_blocks) log_mesg(0, 1, 1, fs_opt.debug, "%s: bitmap free count err, free:%i\n", __FILE__, bfree); fs_close(); /// update progress update_pui(&bprog, 1, 1, 1); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, reiserfs_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = (int)fs->super->s_v1.sb_block_size; image_hdr->totalblock = (unsigned long long)fs->super->s_v1.sb_block_count; image_hdr->usedblocks = (unsigned long long)(fs->super->s_v1.sb_block_count - fs->super->s_v1.sb_free_blocks); image_hdr->device_size = (unsigned long long)(image_hdr->block_size * image_hdr->totalblock); fs_close(); } partclone-0.2.51/src/reiserfsclone.h000066400000000000000000000013521200565264100173730ustar00rootroot00000000000000/** * reiserfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiserfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/restore.c000066400000000000000000000374521200565264100162200ustar00rootroot00000000000000/** * The main program of partclone * * Copyright (c) 2007~ Thomas Tsai * * clone/restore partition to a image, device or stdout. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * progress.h - only for progress bar */ #include "progress.h" void *thread_update_pui(void *arg); progress_bar prog; /// progress_bar structure defined in progress.h unsigned long long copied; unsigned long long block_id; int done; /** * partclone.h - include some structures like image_head, opt_cmd, .... * and functions for main used. */ #include "partclone.h" /// global variable cmd_opt opt; /// cmd_opt structure defined in partclone.h char *EXECNAME="partclone.restore"; /** * main functiom - for colne or restore data */ int main(int argc, char **argv){ char* source; /// source data char* target; /// target data char* buffer; /// buffer data for malloc used char* buffer2; /// buffer data for malloc used int dfr, dfw; /// file descriptor for source and target int r_size, w_size; /// read and write size //unsigned long long block_id, copied = 0; /// block_id is every block in partition /// copied is copied block count off_t offset = 0, sf = 0; /// seek postition, lseek result int start, stop; /// start, range, stop number for progress bar unsigned long long total_write = 0; /// the copied size unsigned long long needed_size = 0; /// the copied size unsigned long long needed_mem = 0; /// the copied size char bitmagic[8] = "BiTmAgIc";// only for check postition char bitmagic_r[8]; /// read magic string from image int cmp; /// compare magic string unsigned long *bitmap; /// the point for bitmap data int debug = 0; /// debug or not unsigned long crc = 0xffffffffL; /// CRC32 check code for writint to image unsigned long crc_ck = 0xffffffffL; /// CRC32 check code for checking unsigned long crc_ck2 = 0xffffffffL; /// CRC32 check code for checking int c_size; /// CRC32 code size //int done = 0; int s_count = 0; int tui = 0; /// text user interface int pui = 0; /// progress mode(default text) int raw = 0; char image_hdr_magic[512]; int next=1,next_int=1,next_max_count=7,next_count=7; unsigned long long next_block_id; char* cache_buffer; int nx_current=0; int flag; pthread_t prog_thread; int pres; void *p_result; //progress_bar prog; /// progress_bar structure defined in progress.h image_head image_hdr; /// image_head structure defined in partclone.h /** * get option and assign to opt structure * check parameter and read from argv */ parse_options(argc, argv, &opt); /** * if "-d / --debug" given * open debug file in "/var/log/partclone.log" for log message */ debug = opt.debug; //if(opt.debug) open_log(opt.logfile); /** * using Text User Interface */ if (opt.ncurses){ pui = NCURSES; log_mesg(1, 0, 0, debug, "Using Ncurses User Interface mode.\n"); } else pui = TEXT; tui = open_pui(pui, opt.fresh); if ((opt.ncurses) && (tui == 0)){ opt.ncurses = 0; log_mesg(1, 0, 0, debug, "Open Ncurses User Interface Error.\n"); } next_max_count = opt.max_block_cache-1; next_count = opt.max_block_cache-1; /// print partclone info print_partclone_info(opt); if (geteuid() != 0) log_mesg(0, 1, 1, debug, "You are not logged as root. You may have \"access denied\" errors when working.\n"); else log_mesg(1, 0, 0, debug, "UID is root.\n"); /// ignore crc check if(opt.ignore_crc) log_mesg(1, 0, 1, debug, "Ignore CRC error\n"); /** * open source and target * clone mode, source is device and target is image file/stdout * restore mode, source is image file/stdin and target is device * dd mode, source is device and target is device !!not complete */ #ifdef _FILE_OFFSET_BITS log_mesg(1, 0, 0, debug, "enable _FILE_OFFSET_BITS %i\n", _FILE_OFFSET_BITS); #endif source = opt.source; target = opt.target; dfr = open_source(source, &opt); if (dfr == -1) { log_mesg(0, 1, 1, debug, "Erro EXIT.\n"); } dfw = open_target(target, &opt); if (dfw == -1) { log_mesg(0, 1, 1, debug, "Error Exit.\n"); } /** * get partition information like super block, image_head, bitmap * from device or image file. */ if (opt.restore){ log_mesg(1, 0, 0, debug, "restore image hdr - get image_head from image file\n"); /// get first 512 byte r_size = read_all(&dfr, image_hdr_magic, 512, &opt); /// check the image magic if (memcmp(image_hdr_magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE) == 0){ restore_image_hdr_sp(&dfr, &opt, &image_hdr, image_hdr_magic); /// check memory size if (check_mem_size(image_hdr, opt, &needed_mem) == -1) log_mesg(0, 1, 1, debug, "Ther is no enough free memory, partclone suggests you should have %i bytes memory\n", needed_mem); /// alloc a memory to restore bitmap bitmap = (unsigned long*)calloc(sizeof(unsigned long), LONGS(image_hdr.totalblock)); if(bitmap == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } /// check the file system //if (strcmp(image_hdr.fs, FS) != 0) // log_mesg(0, 1, 1, debug, "%s can't restore from the image which filesystem is %s not %s\n", argv[0], image_hdr.fs, FS); log_mesg(2, 0, 0, debug, "initial main bitmap pointer %lli\n", bitmap); log_mesg(1, 0, 0, debug, "Initial image hdr - read bitmap table\n"); /// read and check bitmap from image file log_mesg(0, 0, 1, debug, "Calculating bitmap... "); log_mesg(0, 0, 1, debug, "Please wait... "); get_image_bitmap(&dfr, opt, image_hdr, bitmap); /// check the dest partition size. if (opt.restore_raw_file) check_free_space(&dfw, image_hdr.device_size); else if(opt.check) check_size(&dfw, image_hdr.device_size); log_mesg(2, 0, 0, debug, "check main bitmap pointer %i\n", bitmap); log_mesg(0, 0, 1, debug, "done!\n"); }else{ log_mesg(1, 0, 0, debug, "This is not partclone image.\n"); raw = 1; //sf = lseek(dfr, 0, SEEK_SET); log_mesg(1, 0, 0, debug, "Initial image hdr - get Super Block from partition\n"); /// get Super Block information from partition if (dfr != 0) initial_dd_hdr(dfr, &image_hdr); else initial_dd_hdr(dfw, &image_hdr); /// check the dest partition size. if(opt.check){ check_size(&dfw, image_hdr.device_size); } } } log_mesg(1, 0, 0, debug, "print image_head\n"); /// print option to log file if (debug) print_opt(opt); /// print image_head print_image_hdr_info(image_hdr, opt); /** * initial progress bar */ start = 0; /// start number of progress bar stop = (image_hdr.usedblocks+1); /// get the end of progress number, only used block log_mesg(1, 0, 0, debug, "Initial Progress bar\n"); /// Initial progress bar if (opt.no_block_detail) flag = NO_BLOCK_DETAIL; else flag = IO; progress_init(&prog, start, stop, image_hdr.totalblock, flag, image_hdr.block_size); copied = 0; /// initial number is 0 /** * thread to print progress */ pres = pthread_create(&prog_thread, NULL, thread_update_pui, NULL); /** * start read and write data between device and image file */ if ((opt.restore) && (!raw)) { /** * read magic string from image file * and check it. */ r_size = read_all(&dfr, bitmagic_r, 8, &opt); /// read a magic string cmp = memcmp(bitmagic, bitmagic_r, 8); if(cmp != 0) log_mesg(0, 1, 1, debug, "bitmagic error %i\n", cmp); cache_buffer = (char*)malloc(image_hdr.block_size * (next_max_count+1)); if(cache_buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } /// seek to the first sf = lseek(dfw, 0, SEEK_SET); log_mesg(1, 0, 0, debug, "seek %lli for writing dtat string\n",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "seek set %lli\n", sf); /// start restore image file to partition for( block_id = 0; block_id < image_hdr.totalblock; block_id++ ){ r_size = 0; w_size = 0; if (pc_test_bit(block_id, bitmap)){ /// The block is used log_mesg(2, 0, 0, debug, "block_id=%lli, ",block_id); log_mesg(1, 0, 0, debug, "bitmap=%i, ",pc_test_bit(block_id, bitmap)); memset(buffer, 0, image_hdr.block_size); r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(1, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size <0) log_mesg(0, 1, 1, debug, "read errno = %i \n", errno); /// read crc32 code and check it. crc_ck = crc32(crc_ck, buffer, r_size); char crc_buffer[CRC_SIZE]; c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt); if (c_size < CRC_SIZE) log_mesg(0, 1, 1, debug, "read CRC error: %s, please check your image file. \n", strerror(errno)); /*FIX: 64bit image can't ignore crc error*/ if ((memcmp(crc_buffer, &crc_ck, CRC_SIZE) != 0) && (!opt.ignore_crc) ){ log_mesg(1, 0, 0, debug, "CRC Check error. 64bit bug before v0.1.0 (Rev:250M), enlarge crc size and recheck again....\n "); /// check again buffer2 = (char*)malloc(image_hdr.block_size+CRC_SIZE); ///alloc a memory to copy data if(buffer2 == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } memcpy(buffer2, buffer, image_hdr.block_size); memcpy(buffer2+image_hdr.block_size, crc_buffer, CRC_SIZE); memcpy(buffer, buffer2+CRC_SIZE, image_hdr.block_size); crc_ck2 = crc32(crc_ck2, buffer, r_size); c_size = read_all(&dfr, crc_buffer, CRC_SIZE, &opt); if (c_size < CRC_SIZE) log_mesg(0, 1, 1, debug, "read CRC error: %s, please check your image file. \n", strerror(errno)); if ((memcmp(crc_buffer, &crc_ck2, CRC_SIZE) != 0) && (!opt.ignore_crc)){ log_mesg(0, 1, 1, debug, "CRC error again at %i...\n ", sf); } else { crc_ck = crc_ck2; } free(buffer2); } else { crc_ck2 = crc_ck; } if(next != next_count){ memset(cache_buffer, 0, image_hdr.block_size*next_max_count); for (next_int = 1; next_int <= next_max_count; next_int++) { next_block_id = block_id+next_int; if (pc_test_bit(next_block_id, bitmap)) { next++; } else { next_count = next; break; } next_count = next; } log_mesg(1, 0, 0, debug, "next = %i\n",next); } if ((next == next_count) &&(nx_current < next)){ memcpy(cache_buffer+(image_hdr.block_size*nx_current), buffer, image_hdr.block_size); w_size = 0; nx_current++; } if ((next == next_count) && (nx_current == next)){ #ifdef _FILE_OFFSET_BITS offset = (off_t)((block_id-next+1) * image_hdr.block_size); sf = lseek(dfw, offset, SEEK_SET); if (sf == -1) log_mesg(0, 1, 1, debug, "target seek error = %lli, ",sf); #endif /// write block from buffer to partition w_size = write_all(&dfw, cache_buffer, (image_hdr.block_size*nx_current), &opt); log_mesg(1, 0, 0, debug, "bs=%i and w=%i, ",(image_hdr.block_size*nx_current), w_size); if (w_size != (int)image_hdr.block_size*nx_current) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); next = 1; next_count = next_max_count; nx_current=0; } copied++; /// count copied block total_write += (unsigned long long) w_size; /// count copied size /// read or write error //if ((r_size != w_size) || (r_size != image_hdr.block_size)) // log_mesg(0, 1, 1, debug, "read and write different\n"); log_mesg(1, 0, 0, debug, "end\n"); } else { /// for restore to raw file, mount -o loop used. if ((block_id == (image_hdr.totalblock-1)) && (opt.restore_raw_file)){ write_last_block(&dfw, image_hdr.block_size, block_id, &opt); } else { #ifndef _FILE_OFFSET_BITS /// if the block is not used, I just skip it. log_mesg(2, 0, 0, debug, "block_id=%lli, ",block_id); sf = lseek(dfw, image_hdr.block_size, SEEK_CUR); log_mesg(2, 0, 0, debug, "seek=%lli, ",sf); if (sf == (off_t)-1) log_mesg(0, 1, 1, debug, "seek error %lli errno=%i\n", (long long)offset, (int)errno); log_mesg(2, 0, 0, debug, "end\n"); #endif } } //if (!opt.quiet) // update_pui(&prog, copied, block_id, done); } // end of for /// free buffer free(cache_buffer); free(buffer); done = 1; pres = pthread_join(prog_thread, &p_result); update_pui(&prog, copied, block_id, done); sync_data(dfw, &opt); } else if ((opt.restore) && (raw)){ /// start clone partition to image file //write image_head to image file w_size = write_all(&dfw, image_hdr_magic, 512, &opt); if(w_size == -1) log_mesg(0, 1, 1, debug, "write image_hdr to image error\n"); block_id = 1; buffer = (char*)malloc(image_hdr.block_size); ///alloc a memory to copy data if(buffer == NULL){ log_mesg(0, 1, 1, debug, "%s, %i, ERROR:%s", __func__, __LINE__, strerror(errno)); } do { r_size = 0; w_size = 0; memset(buffer, 0, image_hdr.block_size); log_mesg(1, 0, 0, debug, "block_id=%lli, ",block_id); /// read data from source to buffer r_size = read_all(&dfr, buffer, image_hdr.block_size, &opt); log_mesg(1, 0, 0, debug, "bs=%i and r=%i, ",image_hdr.block_size, r_size); if (r_size != (int)image_hdr.block_size){ if (r_size == 0){ //EIO done = 1; } else { log_mesg(0, 1, 1, debug, "read error: %s(%i) rsize=%i\n", strerror(errno), errno, r_size); } } if (r_size == image_hdr.block_size){ /// write buffer to target w_size = write_all(&dfw, buffer, image_hdr.block_size, &opt); log_mesg(2, 0, 0, debug, "bs=%i and w=%i, ",image_hdr.block_size, w_size); if (w_size != (int)image_hdr.block_size) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); } else if (r_size < image_hdr.block_size){ /// write readed buffer to target w_size = write_all(&dfw, buffer, r_size, &opt); log_mesg(2, 0, 0, debug, "bs=%i and w=%i, ",image_hdr.block_size, w_size); if (w_size != r_size) log_mesg(0, 1, 1, debug, "write error %i \n", w_size); } else { w_size = 0; } /// read or write error if (r_size != w_size) log_mesg(0, 1, 1, debug, "read and write different\n"); log_mesg(1, 0, 0, debug, "end\n"); block_id++; copied++; /// count copied block total_write += (unsigned long long)(w_size); /// count copied size log_mesg(1, 0, 0, debug, "total=%lli, ", total_write); //if (!opt.quiet) //update_pui(&prog, copied, block_id, done); } while (done == 0);/// end of for pres = pthread_join(prog_thread, &p_result); update_pui(&prog, copied, block_id, done); sync_data(dfw, &opt); /// free buffer free(buffer); } print_finish_info(opt); close (dfr); /// close source close (dfw); /// close target free(bitmap); /// free bitmp close_pui(pui); printf("Cloned successfully.\n"); if(opt.debug) close_log(); return 0; /// finish } void *thread_update_pui(void *arg){ while (done == 0) { if(!opt.quiet) { update_pui(&prog, copied, block_id, done); } sleep(opt.fresh); } pthread_exit("exit"); } partclone-0.2.51/src/ufs/000077500000000000000000000000001200565264100151535ustar00rootroot00000000000000partclone-0.2.51/src/ufs/ffs/000077500000000000000000000000001200565264100157315ustar00rootroot00000000000000partclone-0.2.51/src/ufs/ffs/fs.h000066400000000000000000000645671200565264100165340ustar00rootroot00000000000000/*- * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)fs.h 8.13 (Berkeley) 3/21/95 * $FreeBSD: src/sys/ufs/ffs/fs.h,v 1.49.8.1 2009/04/15 03:14:26 kensmith Exp $ */ #ifndef _UFS_FFS_FS_H_ #define _UFS_FFS_FS_H_ #include #include /* * Each disk drive contains some number of filesystems. * A filesystem consists of a number of cylinder groups. * Each cylinder group has inodes and data. * * A filesystem is described by its super-block, which in turn * describes the cylinder groups. The super-block is critical * data and is replicated in each cylinder group to protect against * catastrophic loss. This is done at `newfs' time and the critical * super-block data does not change, so the copies need not be * referenced further unless disaster strikes. * * For filesystem fs, the offsets of the various blocks of interest * are given in the super block as: * [fs->fs_sblkno] Super-block * [fs->fs_cblkno] Cylinder group block * [fs->fs_iblkno] Inode blocks * [fs->fs_dblkno] Data blocks * The beginning of cylinder group cg in fs, is given by * the ``cgbase(fs, cg)'' macro. * * Depending on the architecture and the media, the superblock may * reside in any one of four places. For tiny media where every block * counts, it is placed at the very front of the partition. Historically, * UFS1 placed it 8K from the front to leave room for the disk label and * a small bootstrap. For UFS2 it got moved to 64K from the front to leave * room for the disk label and a bigger bootstrap, and for really piggy * systems we check at 256K from the front if the first three fail. In * all cases the size of the superblock will be SBLOCKSIZE. All values are * given in byte-offset form, so they do not imply a sector size. The * SBLOCKSEARCH specifies the order in which the locations should be searched. */ #define SBLOCK_FLOPPY 0 #define SBLOCK_UFS1 8192 #define SBLOCK_UFS2 65536 #define SBLOCK_PIGGY 262144 #define SBLOCKSIZE 8192 #define SBLOCKSEARCH \ { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 } /* * Max number of fragments per block. This value is NOT tweakable. */ #define MAXFRAG 8 /* * Addresses stored in inodes are capable of addressing fragments * of `blocks'. File system blocks of at most size MAXBSIZE can * be optionally broken into 2, 4, or 8 pieces, each of which is * addressable; these pieces may be DEV_BSIZE, or some multiple of * a DEV_BSIZE unit. * * Large files consist of exclusively large data blocks. To avoid * undue wasted disk space, the last data block of a small file may be * allocated as only as many fragments of a large block as are * necessary. The filesystem format retains only a single pointer * to such a fragment, which is a piece of a single large block that * has been divided. The size of such a fragment is determinable from * information in the inode, using the ``blksize(fs, ip, lbn)'' macro. * * The filesystem records space availability at the fragment level; * to determine block availability, aligned fragments are examined. */ /* * MINBSIZE is the smallest allowable block size. * In order to insure that it is possible to create files of size * 2^32 with only two levels of indirection, MINBSIZE is set to 4096. * MINBSIZE must be big enough to hold a cylinder group block, * thus changes to (struct cg) must keep its size within MINBSIZE. * Note that super blocks are always of size SBSIZE, * and that both SBSIZE and MAXBSIZE must be >= MINBSIZE. */ #define MINBSIZE 4096 /* * The path name on which the filesystem is mounted is maintained * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in * the super block for this name. */ #define MAXMNTLEN 468 /* * The volume name for this filesystem is maintained in fs_volname. * MAXVOLLEN defines the length of the buffer allocated. */ #define MAXVOLLEN 32 /* * There is a 128-byte region in the superblock reserved for in-core * pointers to summary information. Originally this included an array * of pointers to blocks of struct csum; now there are just a few * pointers and the remaining space is padded with fs_ocsp[]. * * NOCSPTRS determines the size of this padding. One pointer (fs_csp) * is taken away to point to a contiguous array of struct csum for * all cylinder groups; a second (fs_maxcluster) points to an array * of cluster sizes that is computed as cylinder groups are inspected, * and the third points to an array that tracks the creation of new * directories. A fourth pointer, fs_active, is used when creating * snapshots; it points to a bitmap of cylinder groups for which the * free-block bitmap has changed since the snapshot operation began. */ #define NOCSPTRS ((128 / sizeof(void *)) - 4) /* * A summary of contiguous blocks of various sizes is maintained * in each cylinder group. Normally this is set by the initial * value of fs_maxcontig. To conserve space, a maximum summary size * is set by FS_MAXCONTIG. */ #define FS_MAXCONTIG 16 /* * MINFREE gives the minimum acceptable percentage of filesystem * blocks which may be free. If the freelist drops below this level * only the superuser may continue to allocate blocks. This may * be set to 0 if no reserve of free blocks is deemed necessary, * however throughput drops by fifty percent if the filesystem * is run at between 95% and 100% full; thus the minimum default * value of fs_minfree is 5%. However, to get good clustering * performance, 10% is a better choice. hence we use 10% as our * default value. With 10% free space, fragmentation is not a * problem, so we choose to optimize for time. */ #define MINFREE 8 #define DEFAULTOPT FS_OPTTIME /* * Grigoriy Orlov has done some extensive work to fine * tune the layout preferences for directories within a filesystem. * His algorithm can be tuned by adjusting the following parameters * which tell the system the average file size and the average number * of files per directory. These defaults are well selected for typical * filesystems, but may need to be tuned for odd cases like filesystems * being used for squid caches or news spools. */ #define AVFILESIZ 16384 /* expected average file size */ #define AFPDIR 64 /* expected number of files per directory */ /* * The maximum number of snapshot nodes that can be associated * with each filesystem. This limit affects only the number of * snapshot files that can be recorded within the superblock so * that they can be found when the filesystem is mounted. However, * maintaining too many will slow the filesystem performance, so * having this limit is a good idea. */ #define FSMAXSNAP 20 /* * Used to identify special blocks in snapshots: * * BLK_NOCOPY - A block that was unallocated at the time the snapshot * was taken, hence does not need to be copied when written. * BLK_SNAP - A block held by another snapshot that is not needed by this * snapshot. When the other snapshot is freed, the BLK_SNAP entries * are converted to BLK_NOCOPY. These are needed to allow fsck to * identify blocks that are in use by other snapshots (which are * expunged from this snapshot). */ #define BLK_NOCOPY ((ufs2_daddr_t)(1)) #define BLK_SNAP ((ufs2_daddr_t)(2)) /* * Sysctl values for the fast filesystem. */ #define FFS_ADJ_REFCNT 1 /* adjust inode reference count */ #define FFS_ADJ_BLKCNT 2 /* adjust inode used block count */ #define FFS_BLK_FREE 3 /* free range of blocks in map */ #define FFS_DIR_FREE 4 /* free specified dir inodes in map */ #define FFS_FILE_FREE 5 /* free specified file inodes in map */ #define FFS_SET_FLAGS 6 /* set filesystem flags */ #define FFS_ADJ_NDIR 7 /* adjust number of directories */ #define FFS_ADJ_NBFREE 8 /* adjust number of free blocks */ #define FFS_ADJ_NIFREE 9 /* adjust number of free inodes */ #define FFS_ADJ_NFFREE 10 /* adjust number of free frags */ #define FFS_ADJ_NUMCLUSTERS 11 /* adjust number of free clusters */ #define FFS_MAXID 12 /* number of valid ffs ids */ /* * Command structure passed in to the filesystem to adjust filesystem values. */ #define FFS_CMD_VERSION 0x19790518 /* version ID */ struct fsck_cmd { int32_t version; /* version of command structure */ int32_t handle; /* reference to filesystem to be changed */ int64_t value; /* inode or block number to be affected */ int64_t size; /* amount or range to be adjusted */ int64_t spare; /* reserved for future use */ }; /* * Per cylinder group information; summarized in blocks allocated * from first cylinder group data blocks. These blocks have to be * read in from fs_csaddr (size fs_cssize) in addition to the * super block. */ struct csum { int32_t cs_ndir; /* number of directories */ int32_t cs_nbfree; /* number of free blocks */ int32_t cs_nifree; /* number of free inodes */ int32_t cs_nffree; /* number of free frags */ }; struct csum_total { int64_t cs_ndir; /* number of directories */ int64_t cs_nbfree; /* number of free blocks */ int64_t cs_nifree; /* number of free inodes */ int64_t cs_nffree; /* number of free frags */ int64_t cs_numclusters; /* number of free clusters */ int64_t cs_spare[3]; /* future expansion */ }; /* * Super block for an FFS filesystem. */ struct fs { int32_t fs_firstfield; /* historic filesystem linked list, */ int32_t fs_unused_1; /* used for incore super blocks */ int32_t fs_sblkno; /* offset of super-block in filesys */ int32_t fs_cblkno; /* offset of cyl-block in filesys */ int32_t fs_iblkno; /* offset of inode-blocks in filesys */ int32_t fs_dblkno; /* offset of first data after cg */ int32_t fs_old_cgoffset; /* cylinder group offset in cylinder */ int32_t fs_old_cgmask; /* used to calc mod fs_ntrak */ int32_t fs_old_time; /* last time written */ int32_t fs_old_size; /* number of blocks in fs */ int32_t fs_old_dsize; /* number of data blocks in fs */ int32_t fs_ncg; /* number of cylinder groups */ int32_t fs_bsize; /* size of basic blocks in fs */ int32_t fs_fsize; /* size of frag blocks in fs */ int32_t fs_frag; /* number of frags in a block in fs */ /* these are configuration parameters */ int32_t fs_minfree; /* minimum percentage of free blocks */ int32_t fs_old_rotdelay; /* num of ms for optimal next block */ int32_t fs_old_rps; /* disk revolutions per second */ /* these fields can be computed from the others */ int32_t fs_bmask; /* ``blkoff'' calc of blk offsets */ int32_t fs_fmask; /* ``fragoff'' calc of frag offsets */ int32_t fs_bshift; /* ``lblkno'' calc of logical blkno */ int32_t fs_fshift; /* ``numfrags'' calc number of frags */ /* these are configuration parameters */ int32_t fs_maxcontig; /* max number of contiguous blks */ int32_t fs_maxbpg; /* max number of blks per cyl group */ /* these fields can be computed from the others */ int32_t fs_fragshift; /* block to frag shift */ int32_t fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */ int32_t fs_sbsize; /* actual size of super block */ int32_t fs_spare1[2]; /* old fs_csmask */ /* old fs_csshift */ int32_t fs_nindir; /* value of NINDIR */ int32_t fs_inopb; /* value of INOPB */ int32_t fs_old_nspf; /* value of NSPF */ /* yet another configuration parameter */ int32_t fs_optim; /* optimization preference, see below */ int32_t fs_old_npsect; /* # sectors/track including spares */ int32_t fs_old_interleave; /* hardware sector interleave */ int32_t fs_old_trackskew; /* sector 0 skew, per track */ int32_t fs_id[2]; /* unique filesystem id */ /* sizes determined by number of cylinder groups and their sizes */ int32_t fs_old_csaddr; /* blk addr of cyl grp summary area */ int32_t fs_cssize; /* size of cyl grp summary area */ int32_t fs_cgsize; /* cylinder group size */ int32_t fs_spare2; /* old fs_ntrak */ int32_t fs_old_nsect; /* sectors per track */ int32_t fs_old_spc; /* sectors per cylinder */ int32_t fs_old_ncyl; /* cylinders in filesystem */ int32_t fs_old_cpg; /* cylinders per group */ int32_t fs_ipg; /* inodes per group */ int32_t fs_fpg; /* blocks per group * fs_frag */ /* this data must be re-computed after crashes */ struct csum fs_old_cstotal; /* cylinder summary information */ /* these fields are cleared at mount time */ int8_t fs_fmod; /* super block modified flag */ int8_t fs_clean; /* filesystem is clean flag */ int8_t fs_ronly; /* mounted read-only flag */ int8_t fs_old_flags; /* old FS_ flags */ u_char fs_fsmnt[MAXMNTLEN]; /* name mounted on */ u_char fs_volname[MAXVOLLEN]; /* volume name */ u_int64_t fs_swuid; /* system-wide uid */ int32_t fs_pad; /* due to alignment of fs_swuid */ /* these fields retain the current block allocation info */ int32_t fs_cgrotor; /* last cg searched */ void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */ u_int8_t *fs_contigdirs; /* (u) # of contig. allocated dirs */ struct csum *fs_csp; /* (u) cg summary info buffer */ int32_t *fs_maxcluster; /* (u) max cluster in each cyl group */ u_int *fs_active; /* (u) used by snapshots to track fs */ int32_t fs_old_cpc; /* cyl per cycle in postbl */ int32_t fs_maxbsize; /* maximum blocking factor permitted */ int64_t fs_unrefs; /* number of unreferenced inodes */ int64_t fs_sparecon64[16]; /* old rotation block list head */ int64_t fs_sblockloc; /* byte offset of standard superblock */ struct csum_total fs_cstotal; /* (u) cylinder summary information */ ufs_time_t fs_time; /* last time written */ int64_t fs_size; /* number of blocks in fs */ int64_t fs_dsize; /* number of data blocks in fs */ ufs2_daddr_t fs_csaddr; /* blk addr of cyl grp summary area */ int64_t fs_pendingblocks; /* (u) blocks being freed */ int32_t fs_pendinginodes; /* (u) inodes being freed */ int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */ int32_t fs_avgfilesize; /* expected average file size */ int32_t fs_avgfpdir; /* expected # of files per directory */ int32_t fs_save_cgsize; /* save real cg size to use fs_bsize */ int32_t fs_sparecon32[26]; /* reserved for future constants */ int32_t fs_flags; /* see FS_ flags below */ int32_t fs_contigsumsize; /* size of cluster summary array */ int32_t fs_maxsymlinklen; /* max length of an internal symlink */ int32_t fs_old_inodefmt; /* format of on-disk inodes */ u_int64_t fs_maxfilesize; /* maximum representable file size */ int64_t fs_qbmask; /* ~fs_bmask for use with 64-bit size */ int64_t fs_qfmask; /* ~fs_fmask for use with 64-bit size */ int32_t fs_state; /* validate fs_clean field */ int32_t fs_old_postblformat; /* format of positional layout tables */ int32_t fs_old_nrpos; /* number of rotational positions */ int32_t fs_spare5[2]; /* old fs_postbloff */ /* old fs_rotbloff */ int32_t fs_magic; /* magic number */ }; /* Sanity checking. */ #ifdef CTASSERT CTASSERT(sizeof(struct fs) == 1376); #endif /* * Filesystem identification */ #define FS_UFS1_MAGIC 0x011954 /* UFS1 fast filesystem magic number */ #define FS_UFS2_MAGIC 0x19540119 /* UFS2 fast filesystem magic number */ #define FS_BAD_MAGIC 0x19960408 /* UFS incomplete newfs magic number */ #define FS_OKAY 0x7c269d38 /* superblock checksum */ #define FS_42INODEFMT -1 /* 4.2BSD inode format */ #define FS_44INODEFMT 2 /* 4.4BSD inode format */ /* * Preference for optimization. */ #define FS_OPTTIME 0 /* minimize allocation time */ #define FS_OPTSPACE 1 /* minimize disk fragmentation */ /* * Filesystem flags. * * The FS_UNCLEAN flag is set by the kernel when the filesystem was * mounted with fs_clean set to zero. The FS_DOSOFTDEP flag indicates * that the filesystem should be managed by the soft updates code. * Note that the FS_NEEDSFSCK flag is set and cleared only by the * fsck utility. It is set when background fsck finds an unexpected * inconsistency which requires a traditional foreground fsck to be * run. Such inconsistencies should only be found after an uncorrectable * disk error. A foreground fsck will clear the FS_NEEDSFSCK flag when * it has successfully cleaned up the filesystem. The kernel uses this * flag to enforce that inconsistent filesystems be mounted read-only. * The FS_INDEXDIRS flag when set indicates that the kernel maintains * on-disk auxiliary indexes (such as B-trees) for speeding directory * accesses. Kernels that do not support auxiliary indicies clear the * flag to indicate that the indicies need to be rebuilt (by fsck) before * they can be used. * * FS_ACLS indicates that ACLs are administratively enabled for the * file system, so they should be loaded from extended attributes, * observed for access control purposes, and be administered by object * owners. FS_MULTILABEL indicates that the TrustedBSD MAC Framework * should attempt to back MAC labels into extended attributes on the * file system rather than maintain a single mount label for all * objects. */ #define FS_UNCLEAN 0x01 /* filesystem not clean at mount */ #define FS_DOSOFTDEP 0x02 /* filesystem using soft dependencies */ #define FS_NEEDSFSCK 0x04 /* filesystem needs sync fsck before mount */ #define FS_INDEXDIRS 0x08 /* kernel supports indexed directories */ #define FS_ACLS 0x10 /* file system has ACLs enabled */ #define FS_MULTILABEL 0x20 /* file system is MAC multi-label */ #define FS_GJOURNAL 0x40 /* gjournaled file system */ #define FS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */ /* * Macros to access bits in the fs_active array. */ #define ACTIVECGNUM(fs, cg) ((fs)->fs_active[(cg) / (NBBY * sizeof(int))]) #define ACTIVECGOFF(cg) (1 << ((cg) % (NBBY * sizeof(int)))) #define ACTIVESET(fs, cg) do { \ if ((fs)->fs_active) \ ACTIVECGNUM((fs), (cg)) |= ACTIVECGOFF((cg)); \ } while (0) #define ACTIVECLEAR(fs, cg) do { \ if ((fs)->fs_active) \ ACTIVECGNUM((fs), (cg)) &= ~ACTIVECGOFF((cg)); \ } while (0) /* * The size of a cylinder group is calculated by CGSIZE. The maximum size * is limited by the fact that cylinder groups are at most one block. * Its size is derived from the size of the maps maintained in the * cylinder group and the (struct cg) size. */ #define CGSIZE(fs) \ /* base cg */ (sizeof(struct cg) + sizeof(int32_t) + \ /* old btotoff */ (fs)->fs_old_cpg * sizeof(int32_t) + \ /* old boff */ (fs)->fs_old_cpg * sizeof(u_int16_t) + \ /* inode map */ howmany((fs)->fs_ipg, NBBY) + \ /* block map */ howmany((fs)->fs_fpg, NBBY) +\ /* if present */ ((fs)->fs_contigsumsize <= 0 ? 0 : \ /* cluster sum */ (fs)->fs_contigsumsize * sizeof(int32_t) + \ /* cluster map */ howmany(fragstoblks(fs, (fs)->fs_fpg), NBBY))) /* * The minimal number of cylinder groups that should be created. */ #define MINCYLGRPS 4 /* * Convert cylinder group to base address of its global summary info. */ #define fs_cs(fs, indx) fs_csp[indx] /* * Cylinder group block for a filesystem. */ #define CG_MAGIC 0x090255 struct cg { int32_t cg_firstfield; /* historic cyl groups linked list */ int32_t cg_magic; /* magic number */ int32_t cg_old_time; /* time last written */ int32_t cg_cgx; /* we are the cgx'th cylinder group */ int16_t cg_old_ncyl; /* number of cyl's this cg */ int16_t cg_old_niblk; /* number of inode blocks this cg */ int32_t cg_ndblk; /* number of data blocks this cg */ struct csum cg_cs; /* cylinder summary information */ int32_t cg_rotor; /* position of last used block */ int32_t cg_frotor; /* position of last used frag */ int32_t cg_irotor; /* position of last used inode */ int32_t cg_frsum[MAXFRAG]; /* counts of available frags */ int32_t cg_old_btotoff; /* (int32) block totals per cylinder */ int32_t cg_old_boff; /* (u_int16) free block positions */ int32_t cg_iusedoff; /* (u_int8) used inode map */ int32_t cg_freeoff; /* (u_int8) free block map */ int32_t cg_nextfreeoff; /* (u_int8) next available space */ int32_t cg_clustersumoff; /* (u_int32) counts of avail clusters */ int32_t cg_clusteroff; /* (u_int8) free cluster map */ int32_t cg_nclusterblks; /* number of clusters this cg */ int32_t cg_niblk; /* number of inode blocks this cg */ int32_t cg_initediblk; /* last initialized inode */ int32_t cg_unrefs; /* number of unreferenced inodes */ int32_t cg_sparecon32[2]; /* reserved for future use */ ufs_time_t cg_time; /* time last written */ int64_t cg_sparecon64[3]; /* reserved for future use */ u_int8_t cg_space[1]; /* space for cylinder group maps */ /* actually longer */ }; /* * Macros for access to cylinder group array structures */ #define cg_chkmagic(cgp) ((cgp)->cg_magic == CG_MAGIC) #define cg_inosused(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_iusedoff)) #define cg_blksfree(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_freeoff)) #define cg_clustersfree(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_clusteroff)) #define cg_clustersum(cgp) \ ((int32_t *)((uintptr_t)(cgp) + (cgp)->cg_clustersumoff)) /* * Turn filesystem block numbers into disk block addresses. * This maps filesystem blocks to device size blocks. */ #define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb) #define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb) /* * Cylinder group macros to locate things in cylinder groups. * They calc filesystem addresses of cylinder group data structures. */ #define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c)) #define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */ #define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */ #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */ #define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */ #define cgstart(fs, c) \ ((fs)->fs_magic == FS_UFS2_MAGIC ? cgbase(fs, c) : \ (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask)))) /* * Macros for handling inode numbers: * inode number to filesystem block offset. * inode number to cylinder group number. * inode number to filesystem block address. */ #define ino_to_cg(fs, x) ((x) / (fs)->fs_ipg) #define ino_to_fsba(fs, x) \ ((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, x)) + \ (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs)))))) #define ino_to_fsbo(fs, x) ((x) % INOPB(fs)) /* * Give cylinder group number for a filesystem block. * Give cylinder group block number for a filesystem block. */ #define dtog(fs, d) ((d) / (fs)->fs_fpg) #define dtogd(fs, d) ((d) % (fs)->fs_fpg) /* * Extract the bits for a block from a map. * Compute the cylinder and rotational position of a cyl block addr. */ #define blkmap(fs, map, loc) \ (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag))) /* * The following macros optimize certain frequently calculated * quantities by using shifts and masks in place of divisions * modulos and multiplications. */ #define blkoff(fs, loc) /* calculates (loc % fs->fs_bsize) */ \ ((loc) & (fs)->fs_qbmask) #define fragoff(fs, loc) /* calculates (loc % fs->fs_fsize) */ \ ((loc) & (fs)->fs_qfmask) #define lfragtosize(fs, frag) /* calculates ((off_t)frag * fs->fs_fsize) */ \ (((off_t)(frag)) << (fs)->fs_fshift) #define lblktosize(fs, blk) /* calculates ((off_t)blk * fs->fs_bsize) */ \ (((off_t)(blk)) << (fs)->fs_bshift) /* Use this only when `blk' is known to be small, e.g., < NDADDR. */ #define smalllblktosize(fs, blk) /* calculates (blk * fs->fs_bsize) */ \ ((blk) << (fs)->fs_bshift) #define lblkno(fs, loc) /* calculates (loc / fs->fs_bsize) */ \ ((loc) >> (fs)->fs_bshift) #define numfrags(fs, loc) /* calculates (loc / fs->fs_fsize) */ \ ((loc) >> (fs)->fs_fshift) #define blkroundup(fs, size) /* calculates roundup(size, fs->fs_bsize) */ \ (((size) + (fs)->fs_qbmask) & (fs)->fs_bmask) #define fragroundup(fs, size) /* calculates roundup(size, fs->fs_fsize) */ \ (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask) #define fragstoblks(fs, frags) /* calculates (frags / fs->fs_frag) */ \ ((frags) >> (fs)->fs_fragshift) #define blkstofrags(fs, blks) /* calculates (blks * fs->fs_frag) */ \ ((blks) << (fs)->fs_fragshift) #define fragnum(fs, fsb) /* calculates (fsb % fs->fs_frag) */ \ ((fsb) & ((fs)->fs_frag - 1)) #define blknum(fs, fsb) /* calculates rounddown(fsb, fs->fs_frag) */ \ ((fsb) &~ ((fs)->fs_frag - 1)) /* * Determine the number of available frags given a * percentage to hold in reserve. */ #define freespace(fs, percentreserved) \ (blkstofrags((fs), (fs)->fs_cstotal.cs_nbfree) + \ (fs)->fs_cstotal.cs_nffree - \ (((off_t)((fs)->fs_dsize)) * (percentreserved) / 100)) /* * Determining the size of a file block in the filesystem. */ #define blksize(fs, ip, lbn) \ (((lbn) >= NDADDR || (ip)->i_size >= smalllblktosize(fs, (lbn) + 1)) \ ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (ip)->i_size)))) #define sblksize(fs, size, lbn) \ (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \ ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (size))))) /* * Number of inodes in a secondary storage block/fragment. */ #define INOPB(fs) ((fs)->fs_inopb) #define INOPF(fs) ((fs)->fs_inopb >> (fs)->fs_fragshift) /* * Number of indirects in a filesystem block. */ #define NINDIR(fs) ((fs)->fs_nindir) extern int inside[], around[]; extern u_char *fragtbl[]; #endif partclone-0.2.51/src/ufs/libufs.h000066400000000000000000000074721200565264100166220ustar00rootroot00000000000000/* * Copyright (c) 2002 Juli Mallett. All rights reserved. * * This software was written by Juli Mallett for the * FreeBSD project. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the following * conditions are met: * * 1. Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistribution in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libufs/libufs.h,v 1.12.8.1 2009/04/15 03:14:26 kensmith Exp $ */ #define MAXBSIZE 65536 /* must be power of 2 from param.h of ufs*/ #ifndef __LIBUFS_H__ #define __LIBUFS_H__ /* * libufs macros (internal, non-exported). */ #ifdef _LIBUFS #ifdef _LIBUFS_DEBUGGING /* * Trace steps through libufs, to be used at entry and erroneous return. */ #define ERROR(uufsd, str) \ do { \ fprintf(stderr, "libufs in %s", __func__); \ if (str != NULL) \ fprintf(stderr, ": %s", str); \ if (errno) \ fprintf(stderr, ": %s", strerror(errno)); \ fprintf(stderr, "\n"); \ if ((uufsd) != NULL) \ (uufsd)->d_error = str; \ } while (0) #else /* _LIBUFS_DEBUGGING */ #define ERROR(uufsd, str) \ do { \ if ((uufsd) != NULL) \ (uufsd)->d_error = str; \ } while (0) #endif /* _LIBUFS_DEBUGGING */ #endif /* _LIBUFS */ /* * libufs structures. */ /* * userland ufs disk. */ struct uufsd { const char *d_name; /* disk name */ int d_ufs; /* decimal UFS version */ int d_fd; /* raw device file descriptor */ long d_bsize; /* device bsize */ ufs2_daddr_t d_sblock; /* superblock location */ caddr_t d_inoblock; /* inode block */ ino_t d_inomin; /* low inode */ ino_t d_inomax; /* high inode */ union { struct fs d_fs; /* filesystem information */ char d_sb[MAXBSIZE]; /* superblock as buffer */ } d_sbunion; union { struct cg d_cg; /* cylinder group */ char d_buf[MAXBSIZE]; /* cylinder group storage */ } d_cgunion; int d_ccg; /* current cylinder group */ int d_lcg; /* last cylinder group (in d_cg) */ const char *d_error; /* human readable disk error */ int d_mine; /* internal flags */ #define d_fs d_sbunion.d_fs #define d_sb d_sbunion.d_sb #define d_cg d_cgunion.d_cg }; __BEGIN_DECLS /* * libufs prototypes. */ /* * block.c */ ssize_t bread(struct uufsd *, ufs2_daddr_t, void *, size_t); ssize_t bwrite(struct uufsd *, ufs2_daddr_t, const void *, size_t); /* * cgroup.c */ int cgread(struct uufsd *); int cgread1(struct uufsd *, int); int cgwrite1(struct uufsd *, int); /* * inode.c */ int getino(struct uufsd *, void **, ino_t, int *); /* * sblock.c */ int sbread(struct uufsd *); int sbwrite(struct uufsd *, int); /* * type.c */ int ufs_disk_close(struct uufsd *); int ufs_disk_fillout(struct uufsd *, const char *); int ufs_disk_fillout_blank(struct uufsd *, const char *); int ufs_disk_write(struct uufsd *); __END_DECLS #endif /* __LIBUFS_H__ */ partclone-0.2.51/src/ufs/sys/000077500000000000000000000000001200565264100157715ustar00rootroot00000000000000partclone-0.2.51/src/ufs/sys/disklabel.h000066400000000000000000000241631200565264100201020ustar00rootroot00000000000000/*- * Copyright (c) 1987, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.108.2.2.4.1 2009/04/15 03:14:26 kensmith Exp $ */ #ifndef _SYS_DISKLABEL_H_ #define _SYS_DISKLABEL_H_ #ifndef _KERNEL #include #endif #include #include /* * Disk description table, see disktab(5) */ #define _PATH_DISKTAB "/etc/disktab" /* * Each disk has a label which includes information about the hardware * disk geometry, filesystem partitions, and drive specific information. * The label is in block 0 or 1, possibly offset from the beginning * to leave room for a bootstrap, etc. */ /* XXX these should be defined per controller (or drive) elsewhere, not here! */ #if defined(__i386__) || defined(__amd64__) || defined(__arm__) || \ defined(__ia64__) #define LABELSECTOR 1 /* sector containing label */ #define LABELOFFSET 0 /* offset of label in sector */ #endif #define DISKMAGIC ((u_int32_t)0x82564557) /* The disk magic number */ #ifndef MAXPARTITIONS #define MAXPARTITIONS 8 #endif /* Size of bootblock area in sector-size neutral bytes */ #define BBSIZE 8192 #define LABEL_PART 2 /* partition containing label */ #define RAW_PART 2 /* partition containing whole disk */ #define SWAP_PART 1 /* partition normally containing swap */ struct disklabel { u_int32_t d_magic; /* the magic number */ u_int16_t d_type; /* drive type */ u_int16_t d_subtype; /* controller/d_type specific */ char d_typename[16]; /* type name, e.g. "eagle" */ char d_packname[16]; /* pack identifier */ /* disk geometry: */ u_int32_t d_secsize; /* # of bytes per sector */ u_int32_t d_nsectors; /* # of data sectors per track */ u_int32_t d_ntracks; /* # of tracks per cylinder */ u_int32_t d_ncylinders; /* # of data cylinders per unit */ u_int32_t d_secpercyl; /* # of data sectors per cylinder */ u_int32_t d_secperunit; /* # of data sectors per unit */ /* * Spares (bad sector replacements) below are not counted in * d_nsectors or d_secpercyl. Spare sectors are assumed to * be physical sectors which occupy space at the end of each * track and/or cylinder. */ u_int16_t d_sparespertrack; /* # of spare sectors per track */ u_int16_t d_sparespercyl; /* # of spare sectors per cylinder */ /* * Alternate cylinders include maintenance, replacement, configuration * description areas, etc. */ u_int32_t d_acylinders; /* # of alt. cylinders per unit */ /* hardware characteristics: */ /* * d_interleave, d_trackskew and d_cylskew describe perturbations * in the media format used to compensate for a slow controller. * Interleave is physical sector interleave, set up by the * formatter or controller when formatting. When interleaving is * in use, logically adjacent sectors are not physically * contiguous, but instead are separated by some number of * sectors. It is specified as the ratio of physical sectors * traversed per logical sector. Thus an interleave of 1:1 * implies contiguous layout, while 2:1 implies that logical * sector 0 is separated by one sector from logical sector 1. * d_trackskew is the offset of sector 0 on track N relative to * sector 0 on track N-1 on the same cylinder. Finally, d_cylskew * is the offset of sector 0 on cylinder N relative to sector 0 * on cylinder N-1. */ u_int16_t d_rpm; /* rotational speed */ u_int16_t d_interleave; /* hardware sector interleave */ u_int16_t d_trackskew; /* sector 0 skew, per track */ u_int16_t d_cylskew; /* sector 0 skew, per cylinder */ u_int32_t d_headswitch; /* head switch time, usec */ u_int32_t d_trkseek; /* track-to-track seek, usec */ u_int32_t d_flags; /* generic flags */ #define NDDATA 5 u_int32_t d_drivedata[NDDATA]; /* drive-type specific information */ #define NSPARE 5 u_int32_t d_spare[NSPARE]; /* reserved for future use */ u_int32_t d_magic2; /* the magic number (again) */ u_int16_t d_checksum; /* xor of data incl. partitions */ /* filesystem and partition information: */ u_int16_t d_npartitions; /* number of partitions in following */ u_int32_t d_bbsize; /* size of boot area at sn0, bytes */ u_int32_t d_sbsize; /* max size of fs superblock, bytes */ struct partition { /* the partition table */ u_int32_t p_size; /* number of sectors in partition */ u_int32_t p_offset; /* starting sector */ u_int32_t p_fsize; /* filesystem basic fragment size */ u_int8_t p_fstype; /* filesystem type, see below */ u_int8_t p_frag; /* filesystem fragments per block */ u_int16_t p_cpg; /* filesystem cylinders per group */ } d_partitions[MAXPARTITIONS]; /* actually may be more */ }; #ifdef CTASSERT CTASSERT(sizeof(struct disklabel) == 148 + MAXPARTITIONS * 16); #endif static __inline u_int16_t dkcksum(struct disklabel *lp); static __inline u_int16_t dkcksum(struct disklabel *lp) { u_int16_t *start, *end; u_int16_t sum = 0; start = (u_int16_t *)lp; end = (u_int16_t *)&lp->d_partitions[lp->d_npartitions]; while (start < end) sum ^= *start++; return (sum); } /* d_type values: */ #define DTYPE_SMD 1 /* SMD, XSMD; VAX hp/up */ #define DTYPE_MSCP 2 /* MSCP */ #define DTYPE_DEC 3 /* other DEC (rk, rl) */ #define DTYPE_SCSI 4 /* SCSI */ #define DTYPE_ESDI 5 /* ESDI interface */ #define DTYPE_ST506 6 /* ST506 etc. */ #define DTYPE_HPIB 7 /* CS/80 on HP-IB */ #define DTYPE_HPFL 8 /* HP Fiber-link */ #define DTYPE_FLOPPY 10 /* floppy */ #define DTYPE_CCD 11 /* concatenated disk */ #define DTYPE_VINUM 12 /* vinum volume */ #define DTYPE_DOC2K 13 /* Msys DiskOnChip */ #define DTYPE_RAID 14 /* CMU RAIDFrame */ #define DTYPE_JFS2 16 /* IBM JFS 2 */ #ifdef DKTYPENAMES static const char *dktypenames[] = { "unknown", "SMD", "MSCP", "old DEC", "SCSI", "ESDI", "ST506", "HP-IB", "HP-FL", "type 9", "floppy", "CCD", "Vinum", "DOC2K", "Raid", "?", "jfs", NULL }; #define DKMAXTYPES (sizeof(dktypenames) / sizeof(dktypenames[0]) - 1) #endif /* * Filesystem type and version. * Used to interpret other filesystem-specific * per-partition information. */ #define FS_UNUSED 0 /* unused */ #define FS_SWAP 1 /* swap */ #define FS_V6 2 /* Sixth Edition */ #define FS_V7 3 /* Seventh Edition */ #define FS_SYSV 4 /* System V */ #define FS_V71K 5 /* V7 with 1K blocks (4.1, 2.9) */ #define FS_V8 6 /* Eighth Edition, 4K blocks */ #define FS_BSDFFS 7 /* 4.2BSD fast filesystem */ #define FS_MSDOS 8 /* MSDOS filesystem */ #define FS_BSDLFS 9 /* 4.4BSD log-structured filesystem */ #define FS_OTHER 10 /* in use, but unknown/unsupported */ #define FS_HPFS 11 /* OS/2 high-performance filesystem */ #define FS_ISO9660 12 /* ISO 9660, normally CD-ROM */ #define FS_BOOT 13 /* partition contains bootstrap */ #define FS_VINUM 14 /* Vinum drive */ #define FS_RAID 15 /* RAIDFrame drive */ #define FS_FILECORE 16 /* Acorn Filecore Filing System */ #define FS_EXT2FS 17 /* ext2fs */ #define FS_NTFS 18 /* Windows/NT file system */ #define FS_CCD 20 /* concatenated disk component */ #define FS_JFS2 21 /* IBM JFS2 */ #define FS_UDF 24 /* UDF */ #define FS_EFS 26 /* SGI's Extent File system */ #define FS_ZFS 27 /* Sun's ZFS */ #ifdef FSTYPENAMES static const char *fstypenames[] = { "unused", "swap", "Version 6", "Version 7", "System V", "4.1BSD", "Eighth Edition", "4.2BSD", "MSDOS", "4.4LFS", "unknown", "HPFS", "ISO9660", "boot", "vinum", "raid", "Filecore", "EXT2FS", "NTFS", "?", "ccd", "jfs", "?", "?", "UDF", "?", "EFS", "ZFS", NULL }; #define FSMAXTYPES (sizeof(fstypenames) / sizeof(fstypenames[0]) - 1) #endif /* * flags shared by various drives: */ #define D_REMOVABLE 0x01 /* removable media */ #define D_ECC 0x02 /* supports ECC */ #define D_BADSECT 0x04 /* supports bad sector forw. */ #define D_RAMDISK 0x08 /* disk emulator */ #define D_CHAIN 0x10 /* can do back-back transfers */ /* * Disklabel-specific ioctls. * * NB: defines ioctls from 'd'/128 and up. */ /* get and set disklabel */ #define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */ #define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */ #define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */ #define DIOCBSDBB _IOW('d', 110, void *) /* write bootblocks */ /* * Functions for proper encoding/decoding of struct disklabel into/from * bytestring. */ void bsd_partition_le_dec(u_char *ptr, struct partition *d); int bsd_disklabel_le_dec(u_char *ptr, struct disklabel *d, int maxpart); void bsd_partition_le_enc(u_char *ptr, struct partition *d); void bsd_disklabel_le_enc(u_char *ptr, struct disklabel *d); #ifndef _KERNEL __BEGIN_DECLS struct disklabel *getdiskbyname(const char *); __END_DECLS #endif #endif /* !_SYS_DISKLABEL_H_ */ partclone-0.2.51/src/ufs/ufs/000077500000000000000000000000001200565264100157505ustar00rootroot00000000000000partclone-0.2.51/src/ufs/ufs/dinode.h000066400000000000000000000206371200565264100173730ustar00rootroot00000000000000/*- * Copyright (c) 2002 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed for the FreeBSD Project by Marshall * Kirk McKusick and Network Associates Laboratories, the Security * Research Division of Network Associates, Inc. under DARPA/SPAWAR * contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS * research program * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * Copyright (c) 1982, 1989, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The names of the authors may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)dinode.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/ufs/ufs/dinode.h,v 1.17.8.1 2009/04/15 03:14:26 kensmith Exp $ */ #ifndef _UFS_UFS_DINODE_H_ #define _UFS_UFS_DINODE_H_ #include /* * The root inode is the root of the filesystem. Inode 0 can't be used for * normal purposes and historically bad blocks were linked to inode 1, thus * the root inode is 2. (Inode 1 is no longer used for this purpose, however * numerous dump tapes make this assumption, so we are stuck with it). */ #define ROOTINO ((ino_t)2) /* * The Whiteout inode# is a dummy non-zero inode number which will * never be allocated to a real file. It is used as a place holder * in the directory entry which has been tagged as a DT_WHT entry. * See the comments about ROOTINO above. */ #define WINO ((ino_t)1) /* * The size of physical and logical block numbers and time fields in UFS. */ typedef int32_t ufs1_daddr_t; typedef int64_t ufs2_daddr_t; typedef int64_t ufs_lbn_t; typedef int64_t ufs_time_t; /* File permissions. */ #define IEXEC 0000100 /* Executable. */ #define IWRITE 0000200 /* Writeable. */ #define IREAD 0000400 /* Readable. */ #define ISVTX 0001000 /* Sticky bit. */ #define ISGID 0002000 /* Set-gid. */ #define ISUID 0004000 /* Set-uid. */ /* File types. */ #define IFMT 0170000 /* Mask of file type. */ #define IFIFO 0010000 /* Named pipe (fifo). */ #define IFCHR 0020000 /* Character device. */ #define IFDIR 0040000 /* Directory file. */ #define IFBLK 0060000 /* Block device. */ #define IFREG 0100000 /* Regular file. */ #define IFLNK 0120000 /* Symbolic link. */ #define IFSOCK 0140000 /* UNIX domain socket. */ #define IFWHT 0160000 /* Whiteout. */ /* * A dinode contains all the meta-data associated with a UFS2 file. * This structure defines the on-disk format of a dinode. Since * this structure describes an on-disk structure, all its fields * are defined by types with precise widths. */ #define NXADDR 2 /* External addresses in inode. */ #define NDADDR 12 /* Direct addresses in inode. */ #define NIADDR 3 /* Indirect addresses in inode. */ struct ufs2_dinode { u_int16_t di_mode; /* 0: IFMT, permissions; see below. */ int16_t di_nlink; /* 2: File link count. */ u_int32_t di_uid; /* 4: File owner. */ u_int32_t di_gid; /* 8: File group. */ u_int32_t di_blksize; /* 12: Inode blocksize. */ u_int64_t di_size; /* 16: File byte count. */ u_int64_t di_blocks; /* 24: Blocks actually held. */ ufs_time_t di_atime; /* 32: Last access time. */ ufs_time_t di_mtime; /* 40: Last modified time. */ ufs_time_t di_ctime; /* 48: Last inode change time. */ ufs_time_t di_birthtime; /* 56: Inode creation time. */ int32_t di_mtimensec; /* 64: Last modified time. */ int32_t di_atimensec; /* 68: Last access time. */ int32_t di_ctimensec; /* 72: Last inode change time. */ int32_t di_birthnsec; /* 76: Inode creation time. */ int32_t di_gen; /* 80: Generation number. */ u_int32_t di_kernflags; /* 84: Kernel flags. */ u_int32_t di_flags; /* 88: Status flags (chflags). */ int32_t di_extsize; /* 92: External attributes block. */ ufs2_daddr_t di_extb[NXADDR];/* 96: External attributes block. */ ufs2_daddr_t di_db[NDADDR]; /* 112: Direct disk blocks. */ ufs2_daddr_t di_ib[NIADDR]; /* 208: Indirect disk blocks. */ int64_t di_spare[3]; /* 232: Reserved; currently unused */ }; /* * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their * dev_t value. Short symbolic links place their path in the * di_db area. */ #define di_rdev di_db[0] /* * A UFS1 dinode contains all the meta-data associated with a UFS1 file. * This structure defines the on-disk format of a UFS1 dinode. Since * this structure describes an on-disk structure, all its fields * are defined by types with precise widths. */ struct ufs1_dinode { u_int16_t di_mode; /* 0: IFMT, permissions; see below. */ int16_t di_nlink; /* 2: File link count. */ union { u_int16_t oldids[2]; /* 4: Ffs: old user and group ids. */ } di_u; u_int64_t di_size; /* 8: File byte count. */ int32_t di_atime; /* 16: Last access time. */ int32_t di_atimensec; /* 20: Last access time. */ int32_t di_mtime; /* 24: Last modified time. */ int32_t di_mtimensec; /* 28: Last modified time. */ int32_t di_ctime; /* 32: Last inode change time. */ int32_t di_ctimensec; /* 36: Last inode change time. */ ufs1_daddr_t di_db[NDADDR]; /* 40: Direct disk blocks. */ ufs1_daddr_t di_ib[NIADDR]; /* 88: Indirect disk blocks. */ u_int32_t di_flags; /* 100: Status flags (chflags). */ int32_t di_blocks; /* 104: Blocks actually held. */ int32_t di_gen; /* 108: Generation number. */ u_int32_t di_uid; /* 112: File owner. */ u_int32_t di_gid; /* 116: File group. */ int32_t di_spare[2]; /* 120: Reserved; currently unused */ }; #define di_ogid di_u.oldids[1] #define di_ouid di_u.oldids[0] #endif /* _UFS_UFS_DINODE_H_ */ partclone-0.2.51/src/ufs/ufs/fs.h000066400000000000000000000645671200565264100165530ustar00rootroot00000000000000/*- * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)fs.h 8.13 (Berkeley) 3/21/95 * $FreeBSD: src/sys/ufs/ffs/fs.h,v 1.49.8.1 2009/04/15 03:14:26 kensmith Exp $ */ #ifndef _UFS_FFS_FS_H_ #define _UFS_FFS_FS_H_ #include #include /* * Each disk drive contains some number of filesystems. * A filesystem consists of a number of cylinder groups. * Each cylinder group has inodes and data. * * A filesystem is described by its super-block, which in turn * describes the cylinder groups. The super-block is critical * data and is replicated in each cylinder group to protect against * catastrophic loss. This is done at `newfs' time and the critical * super-block data does not change, so the copies need not be * referenced further unless disaster strikes. * * For filesystem fs, the offsets of the various blocks of interest * are given in the super block as: * [fs->fs_sblkno] Super-block * [fs->fs_cblkno] Cylinder group block * [fs->fs_iblkno] Inode blocks * [fs->fs_dblkno] Data blocks * The beginning of cylinder group cg in fs, is given by * the ``cgbase(fs, cg)'' macro. * * Depending on the architecture and the media, the superblock may * reside in any one of four places. For tiny media where every block * counts, it is placed at the very front of the partition. Historically, * UFS1 placed it 8K from the front to leave room for the disk label and * a small bootstrap. For UFS2 it got moved to 64K from the front to leave * room for the disk label and a bigger bootstrap, and for really piggy * systems we check at 256K from the front if the first three fail. In * all cases the size of the superblock will be SBLOCKSIZE. All values are * given in byte-offset form, so they do not imply a sector size. The * SBLOCKSEARCH specifies the order in which the locations should be searched. */ #define SBLOCK_FLOPPY 0 #define SBLOCK_UFS1 8192 #define SBLOCK_UFS2 65536 #define SBLOCK_PIGGY 262144 #define SBLOCKSIZE 8192 #define SBLOCKSEARCH \ { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 } /* * Max number of fragments per block. This value is NOT tweakable. */ #define MAXFRAG 8 /* * Addresses stored in inodes are capable of addressing fragments * of `blocks'. File system blocks of at most size MAXBSIZE can * be optionally broken into 2, 4, or 8 pieces, each of which is * addressable; these pieces may be DEV_BSIZE, or some multiple of * a DEV_BSIZE unit. * * Large files consist of exclusively large data blocks. To avoid * undue wasted disk space, the last data block of a small file may be * allocated as only as many fragments of a large block as are * necessary. The filesystem format retains only a single pointer * to such a fragment, which is a piece of a single large block that * has been divided. The size of such a fragment is determinable from * information in the inode, using the ``blksize(fs, ip, lbn)'' macro. * * The filesystem records space availability at the fragment level; * to determine block availability, aligned fragments are examined. */ /* * MINBSIZE is the smallest allowable block size. * In order to insure that it is possible to create files of size * 2^32 with only two levels of indirection, MINBSIZE is set to 4096. * MINBSIZE must be big enough to hold a cylinder group block, * thus changes to (struct cg) must keep its size within MINBSIZE. * Note that super blocks are always of size SBSIZE, * and that both SBSIZE and MAXBSIZE must be >= MINBSIZE. */ #define MINBSIZE 4096 /* * The path name on which the filesystem is mounted is maintained * in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in * the super block for this name. */ #define MAXMNTLEN 468 /* * The volume name for this filesystem is maintained in fs_volname. * MAXVOLLEN defines the length of the buffer allocated. */ #define MAXVOLLEN 32 /* * There is a 128-byte region in the superblock reserved for in-core * pointers to summary information. Originally this included an array * of pointers to blocks of struct csum; now there are just a few * pointers and the remaining space is padded with fs_ocsp[]. * * NOCSPTRS determines the size of this padding. One pointer (fs_csp) * is taken away to point to a contiguous array of struct csum for * all cylinder groups; a second (fs_maxcluster) points to an array * of cluster sizes that is computed as cylinder groups are inspected, * and the third points to an array that tracks the creation of new * directories. A fourth pointer, fs_active, is used when creating * snapshots; it points to a bitmap of cylinder groups for which the * free-block bitmap has changed since the snapshot operation began. */ #define NOCSPTRS ((128 / sizeof(void *)) - 4) /* * A summary of contiguous blocks of various sizes is maintained * in each cylinder group. Normally this is set by the initial * value of fs_maxcontig. To conserve space, a maximum summary size * is set by FS_MAXCONTIG. */ #define FS_MAXCONTIG 16 /* * MINFREE gives the minimum acceptable percentage of filesystem * blocks which may be free. If the freelist drops below this level * only the superuser may continue to allocate blocks. This may * be set to 0 if no reserve of free blocks is deemed necessary, * however throughput drops by fifty percent if the filesystem * is run at between 95% and 100% full; thus the minimum default * value of fs_minfree is 5%. However, to get good clustering * performance, 10% is a better choice. hence we use 10% as our * default value. With 10% free space, fragmentation is not a * problem, so we choose to optimize for time. */ #define MINFREE 8 #define DEFAULTOPT FS_OPTTIME /* * Grigoriy Orlov has done some extensive work to fine * tune the layout preferences for directories within a filesystem. * His algorithm can be tuned by adjusting the following parameters * which tell the system the average file size and the average number * of files per directory. These defaults are well selected for typical * filesystems, but may need to be tuned for odd cases like filesystems * being used for squid caches or news spools. */ #define AVFILESIZ 16384 /* expected average file size */ #define AFPDIR 64 /* expected number of files per directory */ /* * The maximum number of snapshot nodes that can be associated * with each filesystem. This limit affects only the number of * snapshot files that can be recorded within the superblock so * that they can be found when the filesystem is mounted. However, * maintaining too many will slow the filesystem performance, so * having this limit is a good idea. */ #define FSMAXSNAP 20 /* * Used to identify special blocks in snapshots: * * BLK_NOCOPY - A block that was unallocated at the time the snapshot * was taken, hence does not need to be copied when written. * BLK_SNAP - A block held by another snapshot that is not needed by this * snapshot. When the other snapshot is freed, the BLK_SNAP entries * are converted to BLK_NOCOPY. These are needed to allow fsck to * identify blocks that are in use by other snapshots (which are * expunged from this snapshot). */ #define BLK_NOCOPY ((ufs2_daddr_t)(1)) #define BLK_SNAP ((ufs2_daddr_t)(2)) /* * Sysctl values for the fast filesystem. */ #define FFS_ADJ_REFCNT 1 /* adjust inode reference count */ #define FFS_ADJ_BLKCNT 2 /* adjust inode used block count */ #define FFS_BLK_FREE 3 /* free range of blocks in map */ #define FFS_DIR_FREE 4 /* free specified dir inodes in map */ #define FFS_FILE_FREE 5 /* free specified file inodes in map */ #define FFS_SET_FLAGS 6 /* set filesystem flags */ #define FFS_ADJ_NDIR 7 /* adjust number of directories */ #define FFS_ADJ_NBFREE 8 /* adjust number of free blocks */ #define FFS_ADJ_NIFREE 9 /* adjust number of free inodes */ #define FFS_ADJ_NFFREE 10 /* adjust number of free frags */ #define FFS_ADJ_NUMCLUSTERS 11 /* adjust number of free clusters */ #define FFS_MAXID 12 /* number of valid ffs ids */ /* * Command structure passed in to the filesystem to adjust filesystem values. */ #define FFS_CMD_VERSION 0x19790518 /* version ID */ struct fsck_cmd { int32_t version; /* version of command structure */ int32_t handle; /* reference to filesystem to be changed */ int64_t value; /* inode or block number to be affected */ int64_t size; /* amount or range to be adjusted */ int64_t spare; /* reserved for future use */ }; /* * Per cylinder group information; summarized in blocks allocated * from first cylinder group data blocks. These blocks have to be * read in from fs_csaddr (size fs_cssize) in addition to the * super block. */ struct csum { int32_t cs_ndir; /* number of directories */ int32_t cs_nbfree; /* number of free blocks */ int32_t cs_nifree; /* number of free inodes */ int32_t cs_nffree; /* number of free frags */ }; struct csum_total { int64_t cs_ndir; /* number of directories */ int64_t cs_nbfree; /* number of free blocks */ int64_t cs_nifree; /* number of free inodes */ int64_t cs_nffree; /* number of free frags */ int64_t cs_numclusters; /* number of free clusters */ int64_t cs_spare[3]; /* future expansion */ }; /* * Super block for an FFS filesystem. */ struct fs { int32_t fs_firstfield; /* historic filesystem linked list, */ int32_t fs_unused_1; /* used for incore super blocks */ int32_t fs_sblkno; /* offset of super-block in filesys */ int32_t fs_cblkno; /* offset of cyl-block in filesys */ int32_t fs_iblkno; /* offset of inode-blocks in filesys */ int32_t fs_dblkno; /* offset of first data after cg */ int32_t fs_old_cgoffset; /* cylinder group offset in cylinder */ int32_t fs_old_cgmask; /* used to calc mod fs_ntrak */ int32_t fs_old_time; /* last time written */ int32_t fs_old_size; /* number of blocks in fs */ int32_t fs_old_dsize; /* number of data blocks in fs */ int32_t fs_ncg; /* number of cylinder groups */ int32_t fs_bsize; /* size of basic blocks in fs */ int32_t fs_fsize; /* size of frag blocks in fs */ int32_t fs_frag; /* number of frags in a block in fs */ /* these are configuration parameters */ int32_t fs_minfree; /* minimum percentage of free blocks */ int32_t fs_old_rotdelay; /* num of ms for optimal next block */ int32_t fs_old_rps; /* disk revolutions per second */ /* these fields can be computed from the others */ int32_t fs_bmask; /* ``blkoff'' calc of blk offsets */ int32_t fs_fmask; /* ``fragoff'' calc of frag offsets */ int32_t fs_bshift; /* ``lblkno'' calc of logical blkno */ int32_t fs_fshift; /* ``numfrags'' calc number of frags */ /* these are configuration parameters */ int32_t fs_maxcontig; /* max number of contiguous blks */ int32_t fs_maxbpg; /* max number of blks per cyl group */ /* these fields can be computed from the others */ int32_t fs_fragshift; /* block to frag shift */ int32_t fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */ int32_t fs_sbsize; /* actual size of super block */ int32_t fs_spare1[2]; /* old fs_csmask */ /* old fs_csshift */ int32_t fs_nindir; /* value of NINDIR */ int32_t fs_inopb; /* value of INOPB */ int32_t fs_old_nspf; /* value of NSPF */ /* yet another configuration parameter */ int32_t fs_optim; /* optimization preference, see below */ int32_t fs_old_npsect; /* # sectors/track including spares */ int32_t fs_old_interleave; /* hardware sector interleave */ int32_t fs_old_trackskew; /* sector 0 skew, per track */ int32_t fs_id[2]; /* unique filesystem id */ /* sizes determined by number of cylinder groups and their sizes */ int32_t fs_old_csaddr; /* blk addr of cyl grp summary area */ int32_t fs_cssize; /* size of cyl grp summary area */ int32_t fs_cgsize; /* cylinder group size */ int32_t fs_spare2; /* old fs_ntrak */ int32_t fs_old_nsect; /* sectors per track */ int32_t fs_old_spc; /* sectors per cylinder */ int32_t fs_old_ncyl; /* cylinders in filesystem */ int32_t fs_old_cpg; /* cylinders per group */ int32_t fs_ipg; /* inodes per group */ int32_t fs_fpg; /* blocks per group * fs_frag */ /* this data must be re-computed after crashes */ struct csum fs_old_cstotal; /* cylinder summary information */ /* these fields are cleared at mount time */ int8_t fs_fmod; /* super block modified flag */ int8_t fs_clean; /* filesystem is clean flag */ int8_t fs_ronly; /* mounted read-only flag */ int8_t fs_old_flags; /* old FS_ flags */ u_char fs_fsmnt[MAXMNTLEN]; /* name mounted on */ u_char fs_volname[MAXVOLLEN]; /* volume name */ u_int64_t fs_swuid; /* system-wide uid */ int32_t fs_pad; /* due to alignment of fs_swuid */ /* these fields retain the current block allocation info */ int32_t fs_cgrotor; /* last cg searched */ void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */ u_int8_t *fs_contigdirs; /* (u) # of contig. allocated dirs */ struct csum *fs_csp; /* (u) cg summary info buffer */ int32_t *fs_maxcluster; /* (u) max cluster in each cyl group */ u_int *fs_active; /* (u) used by snapshots to track fs */ int32_t fs_old_cpc; /* cyl per cycle in postbl */ int32_t fs_maxbsize; /* maximum blocking factor permitted */ int64_t fs_unrefs; /* number of unreferenced inodes */ int64_t fs_sparecon64[16]; /* old rotation block list head */ int64_t fs_sblockloc; /* byte offset of standard superblock */ struct csum_total fs_cstotal; /* (u) cylinder summary information */ ufs_time_t fs_time; /* last time written */ int64_t fs_size; /* number of blocks in fs */ int64_t fs_dsize; /* number of data blocks in fs */ ufs2_daddr_t fs_csaddr; /* blk addr of cyl grp summary area */ int64_t fs_pendingblocks; /* (u) blocks being freed */ int32_t fs_pendinginodes; /* (u) inodes being freed */ int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */ int32_t fs_avgfilesize; /* expected average file size */ int32_t fs_avgfpdir; /* expected # of files per directory */ int32_t fs_save_cgsize; /* save real cg size to use fs_bsize */ int32_t fs_sparecon32[26]; /* reserved for future constants */ int32_t fs_flags; /* see FS_ flags below */ int32_t fs_contigsumsize; /* size of cluster summary array */ int32_t fs_maxsymlinklen; /* max length of an internal symlink */ int32_t fs_old_inodefmt; /* format of on-disk inodes */ u_int64_t fs_maxfilesize; /* maximum representable file size */ int64_t fs_qbmask; /* ~fs_bmask for use with 64-bit size */ int64_t fs_qfmask; /* ~fs_fmask for use with 64-bit size */ int32_t fs_state; /* validate fs_clean field */ int32_t fs_old_postblformat; /* format of positional layout tables */ int32_t fs_old_nrpos; /* number of rotational positions */ int32_t fs_spare5[2]; /* old fs_postbloff */ /* old fs_rotbloff */ int32_t fs_magic; /* magic number */ }; /* Sanity checking. */ #ifdef CTASSERT CTASSERT(sizeof(struct fs) == 1376); #endif /* * Filesystem identification */ #define FS_UFS1_MAGIC 0x011954 /* UFS1 fast filesystem magic number */ #define FS_UFS2_MAGIC 0x19540119 /* UFS2 fast filesystem magic number */ #define FS_BAD_MAGIC 0x19960408 /* UFS incomplete newfs magic number */ #define FS_OKAY 0x7c269d38 /* superblock checksum */ #define FS_42INODEFMT -1 /* 4.2BSD inode format */ #define FS_44INODEFMT 2 /* 4.4BSD inode format */ /* * Preference for optimization. */ #define FS_OPTTIME 0 /* minimize allocation time */ #define FS_OPTSPACE 1 /* minimize disk fragmentation */ /* * Filesystem flags. * * The FS_UNCLEAN flag is set by the kernel when the filesystem was * mounted with fs_clean set to zero. The FS_DOSOFTDEP flag indicates * that the filesystem should be managed by the soft updates code. * Note that the FS_NEEDSFSCK flag is set and cleared only by the * fsck utility. It is set when background fsck finds an unexpected * inconsistency which requires a traditional foreground fsck to be * run. Such inconsistencies should only be found after an uncorrectable * disk error. A foreground fsck will clear the FS_NEEDSFSCK flag when * it has successfully cleaned up the filesystem. The kernel uses this * flag to enforce that inconsistent filesystems be mounted read-only. * The FS_INDEXDIRS flag when set indicates that the kernel maintains * on-disk auxiliary indexes (such as B-trees) for speeding directory * accesses. Kernels that do not support auxiliary indicies clear the * flag to indicate that the indicies need to be rebuilt (by fsck) before * they can be used. * * FS_ACLS indicates that ACLs are administratively enabled for the * file system, so they should be loaded from extended attributes, * observed for access control purposes, and be administered by object * owners. FS_MULTILABEL indicates that the TrustedBSD MAC Framework * should attempt to back MAC labels into extended attributes on the * file system rather than maintain a single mount label for all * objects. */ #define FS_UNCLEAN 0x01 /* filesystem not clean at mount */ #define FS_DOSOFTDEP 0x02 /* filesystem using soft dependencies */ #define FS_NEEDSFSCK 0x04 /* filesystem needs sync fsck before mount */ #define FS_INDEXDIRS 0x08 /* kernel supports indexed directories */ #define FS_ACLS 0x10 /* file system has ACLs enabled */ #define FS_MULTILABEL 0x20 /* file system is MAC multi-label */ #define FS_GJOURNAL 0x40 /* gjournaled file system */ #define FS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */ /* * Macros to access bits in the fs_active array. */ #define ACTIVECGNUM(fs, cg) ((fs)->fs_active[(cg) / (NBBY * sizeof(int))]) #define ACTIVECGOFF(cg) (1 << ((cg) % (NBBY * sizeof(int)))) #define ACTIVESET(fs, cg) do { \ if ((fs)->fs_active) \ ACTIVECGNUM((fs), (cg)) |= ACTIVECGOFF((cg)); \ } while (0) #define ACTIVECLEAR(fs, cg) do { \ if ((fs)->fs_active) \ ACTIVECGNUM((fs), (cg)) &= ~ACTIVECGOFF((cg)); \ } while (0) /* * The size of a cylinder group is calculated by CGSIZE. The maximum size * is limited by the fact that cylinder groups are at most one block. * Its size is derived from the size of the maps maintained in the * cylinder group and the (struct cg) size. */ #define CGSIZE(fs) \ /* base cg */ (sizeof(struct cg) + sizeof(int32_t) + \ /* old btotoff */ (fs)->fs_old_cpg * sizeof(int32_t) + \ /* old boff */ (fs)->fs_old_cpg * sizeof(u_int16_t) + \ /* inode map */ howmany((fs)->fs_ipg, NBBY) + \ /* block map */ howmany((fs)->fs_fpg, NBBY) +\ /* if present */ ((fs)->fs_contigsumsize <= 0 ? 0 : \ /* cluster sum */ (fs)->fs_contigsumsize * sizeof(int32_t) + \ /* cluster map */ howmany(fragstoblks(fs, (fs)->fs_fpg), NBBY))) /* * The minimal number of cylinder groups that should be created. */ #define MINCYLGRPS 4 /* * Convert cylinder group to base address of its global summary info. */ #define fs_cs(fs, indx) fs_csp[indx] /* * Cylinder group block for a filesystem. */ #define CG_MAGIC 0x090255 struct cg { int32_t cg_firstfield; /* historic cyl groups linked list */ int32_t cg_magic; /* magic number */ int32_t cg_old_time; /* time last written */ int32_t cg_cgx; /* we are the cgx'th cylinder group */ int16_t cg_old_ncyl; /* number of cyl's this cg */ int16_t cg_old_niblk; /* number of inode blocks this cg */ int32_t cg_ndblk; /* number of data blocks this cg */ struct csum cg_cs; /* cylinder summary information */ int32_t cg_rotor; /* position of last used block */ int32_t cg_frotor; /* position of last used frag */ int32_t cg_irotor; /* position of last used inode */ int32_t cg_frsum[MAXFRAG]; /* counts of available frags */ int32_t cg_old_btotoff; /* (int32) block totals per cylinder */ int32_t cg_old_boff; /* (u_int16) free block positions */ int32_t cg_iusedoff; /* (u_int8) used inode map */ int32_t cg_freeoff; /* (u_int8) free block map */ int32_t cg_nextfreeoff; /* (u_int8) next available space */ int32_t cg_clustersumoff; /* (u_int32) counts of avail clusters */ int32_t cg_clusteroff; /* (u_int8) free cluster map */ int32_t cg_nclusterblks; /* number of clusters this cg */ int32_t cg_niblk; /* number of inode blocks this cg */ int32_t cg_initediblk; /* last initialized inode */ int32_t cg_unrefs; /* number of unreferenced inodes */ int32_t cg_sparecon32[2]; /* reserved for future use */ ufs_time_t cg_time; /* time last written */ int64_t cg_sparecon64[3]; /* reserved for future use */ u_int8_t cg_space[1]; /* space for cylinder group maps */ /* actually longer */ }; /* * Macros for access to cylinder group array structures */ #define cg_chkmagic(cgp) ((cgp)->cg_magic == CG_MAGIC) #define cg_inosused(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_iusedoff)) #define cg_blksfree(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_freeoff)) #define cg_clustersfree(cgp) \ ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_clusteroff)) #define cg_clustersum(cgp) \ ((int32_t *)((uintptr_t)(cgp) + (cgp)->cg_clustersumoff)) /* * Turn filesystem block numbers into disk block addresses. * This maps filesystem blocks to device size blocks. */ #define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb) #define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb) /* * Cylinder group macros to locate things in cylinder groups. * They calc filesystem addresses of cylinder group data structures. */ #define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c)) #define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */ #define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */ #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */ #define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */ #define cgstart(fs, c) \ ((fs)->fs_magic == FS_UFS2_MAGIC ? cgbase(fs, c) : \ (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask)))) /* * Macros for handling inode numbers: * inode number to filesystem block offset. * inode number to cylinder group number. * inode number to filesystem block address. */ #define ino_to_cg(fs, x) ((x) / (fs)->fs_ipg) #define ino_to_fsba(fs, x) \ ((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, x)) + \ (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs)))))) #define ino_to_fsbo(fs, x) ((x) % INOPB(fs)) /* * Give cylinder group number for a filesystem block. * Give cylinder group block number for a filesystem block. */ #define dtog(fs, d) ((d) / (fs)->fs_fpg) #define dtogd(fs, d) ((d) % (fs)->fs_fpg) /* * Extract the bits for a block from a map. * Compute the cylinder and rotational position of a cyl block addr. */ #define blkmap(fs, map, loc) \ (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag))) /* * The following macros optimize certain frequently calculated * quantities by using shifts and masks in place of divisions * modulos and multiplications. */ #define blkoff(fs, loc) /* calculates (loc % fs->fs_bsize) */ \ ((loc) & (fs)->fs_qbmask) #define fragoff(fs, loc) /* calculates (loc % fs->fs_fsize) */ \ ((loc) & (fs)->fs_qfmask) #define lfragtosize(fs, frag) /* calculates ((off_t)frag * fs->fs_fsize) */ \ (((off_t)(frag)) << (fs)->fs_fshift) #define lblktosize(fs, blk) /* calculates ((off_t)blk * fs->fs_bsize) */ \ (((off_t)(blk)) << (fs)->fs_bshift) /* Use this only when `blk' is known to be small, e.g., < NDADDR. */ #define smalllblktosize(fs, blk) /* calculates (blk * fs->fs_bsize) */ \ ((blk) << (fs)->fs_bshift) #define lblkno(fs, loc) /* calculates (loc / fs->fs_bsize) */ \ ((loc) >> (fs)->fs_bshift) #define numfrags(fs, loc) /* calculates (loc / fs->fs_fsize) */ \ ((loc) >> (fs)->fs_fshift) #define blkroundup(fs, size) /* calculates roundup(size, fs->fs_bsize) */ \ (((size) + (fs)->fs_qbmask) & (fs)->fs_bmask) #define fragroundup(fs, size) /* calculates roundup(size, fs->fs_fsize) */ \ (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask) #define fragstoblks(fs, frags) /* calculates (frags / fs->fs_frag) */ \ ((frags) >> (fs)->fs_fragshift) #define blkstofrags(fs, blks) /* calculates (blks * fs->fs_frag) */ \ ((blks) << (fs)->fs_fragshift) #define fragnum(fs, fsb) /* calculates (fsb % fs->fs_frag) */ \ ((fsb) & ((fs)->fs_frag - 1)) #define blknum(fs, fsb) /* calculates rounddown(fsb, fs->fs_frag) */ \ ((fsb) &~ ((fs)->fs_frag - 1)) /* * Determine the number of available frags given a * percentage to hold in reserve. */ #define freespace(fs, percentreserved) \ (blkstofrags((fs), (fs)->fs_cstotal.cs_nbfree) + \ (fs)->fs_cstotal.cs_nffree - \ (((off_t)((fs)->fs_dsize)) * (percentreserved) / 100)) /* * Determining the size of a file block in the filesystem. */ #define blksize(fs, ip, lbn) \ (((lbn) >= NDADDR || (ip)->i_size >= smalllblktosize(fs, (lbn) + 1)) \ ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (ip)->i_size)))) #define sblksize(fs, size, lbn) \ (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \ ? (fs)->fs_bsize \ : (fragroundup(fs, blkoff(fs, (size))))) /* * Number of inodes in a secondary storage block/fragment. */ #define INOPB(fs) ((fs)->fs_inopb) #define INOPF(fs) ((fs)->fs_inopb >> (fs)->fs_fragshift) /* * Number of indirects in a filesystem block. */ #define NINDIR(fs) ((fs)->fs_nindir) extern int inside[], around[]; extern u_char *fragtbl[]; #endif partclone-0.2.51/src/ufsclone.c000066400000000000000000000156051200565264100163470ustar00rootroot00000000000000/** * ufsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read ufs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include "ufs/ufs/dinode.h" #include "ufs/ffs/fs.h" #include "ufs/sys/disklabel.h" #include "ufs/libufs.h" #include #include #include #include #include #include #include #include #include #define afs disk.d_fs #define acg disk.d_cg struct uufsd disk; #include "partclone.h" #include "ufsclone.h" #include "progress.h" #include "fs_common.h" char *EXECNAME = "partclone.ufs"; extern fs_cmd_opt fs_opt; /// open device static void fs_open(char* device){ int fsflags; log_mesg(3, 0, 0, fs_opt.debug, "%s: UFS partition Open\n", __FILE__); if (ufs_disk_fillout(&disk, device) == -1){ log_mesg(0, 1, 1, fs_opt.debug, "%s: UFS open fail\n", __FILE__); } else { log_mesg(0, 0, 0, fs_opt.debug, "%s: UFS open well\n", __FILE__); } switch (disk.d_ufs) { case 2: log_mesg(1, 0, 0, fs_opt.debug, "%s: magic = %x (UFS2)\n", __FILE__, afs.fs_magic); log_mesg(1, 0, 0, fs_opt.debug, "%s: superblock location = %lld\nid = [ %x %x ]\n", __FILE__, afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]); log_mesg(1, 0, 0, fs_opt.debug, "%s: group (ncg) = %d\n", __FILE__, afs.fs_ncg); log_mesg(1, 0, 0, fs_opt.debug, "%s: UFS size = %lld\n", __FILE__, afs.fs_size); log_mesg(1, 0, 0, fs_opt.debug, "%s: Blocksize fs_fsize = %i\n", __FILE__, afs.fs_fsize); log_mesg(1, 0, 0, fs_opt.debug, "%s: partition size = %lld\n", __FILE__, afs.fs_size*afs.fs_fsize); log_mesg(1, 0, 0, fs_opt.debug, "%s: block per group %i\n", __FILE__, afs.fs_fpg); break; case 1: log_mesg(1, 0, 0, fs_opt.debug, "%s: magic = %x (UFS1)\n", __FILE__, afs.fs_magic); log_mesg(1, 0, 0, fs_opt.debug, "%s: superblock location = %lld\nid = [ %x %x ]\n", __FILE__, afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]); log_mesg(1, 0, 0, fs_opt.debug, "%s: group (ncg) = %d\n", __FILE__, afs.fs_ncg); log_mesg(1, 0, 0, fs_opt.debug, "%s: UFS size = %lld\n", __FILE__, afs.fs_size); log_mesg(1, 0, 0, fs_opt.debug, "%s: Blocksize fs_fsize = %i\n", __FILE__, afs.fs_fsize); log_mesg(1, 0, 0, fs_opt.debug, "%s: partition size = %lld\n", __FILE__, afs.fs_old_size*afs.fs_fsize); log_mesg(1, 0, 0, fs_opt.debug, "%s: block per group %i\n", __FILE__, afs.fs_fpg); break; default: log_mesg(1, 0, 0, fs_opt.debug, "%s: disk.d_ufs = %c", __FILE__, disk.d_ufs); break; } /// get ufs flags if (afs.fs_old_flags & FS_FLAGS_UPDATED) fsflags == afs.fs_flags; else fsflags == afs.fs_old_flags; /// check ufs status if(fs_opt.ignore_fschk){ log_mesg(1, 0, 0, fs_opt.debug, "%s: %s: Ignore filesystem check\n", __FILE__, __FILE__); }else{ if (afs.fs_clean == 1) { log_mesg(1, 0, 0, fs_opt.debug, "%s: FS CLEAN (%i)\n", __FILE__, afs.fs_clean); } else { if ((fsflags & (FS_UNCLEAN | FS_NEEDSFSCK)) == 0) { log_mesg(0, 1, 1, fs_opt.debug, "%s: UFS flag FS_UNCLEAN or FS_NEEDSFSCK\n\n", __FILE__); } log_mesg(1, 0, 0, fs_opt.debug, "%s: FS CLEAN not set!(%i)\n", __FILE__, afs.fs_clean); } } } /// close device static void fs_close(){ log_mesg(1, 0, 0, fs_opt.debug, "%s: close\n", __FILE__); ufs_disk_close(&disk); log_mesg(1, 0, 0, fs_opt.debug, "%s: done\n\n", __FILE__); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { unsigned long long total_block, block, bused = 0, bfree = 0; int done = 0, i = 0, start = 0, bit_size = 1; char* p; fs_open(device); /// init progress progress_bar bprog; /// progress_bar structure defined in progress.h progress_init(&bprog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); total_block = 0; /// read group while ((i = cgread(&disk)) != 0) { log_mesg(2, 0, 0, fs_opt.debug, "%s: \ncg = %d\n", __FILE__, disk.d_lcg); log_mesg(2, 0, 0, fs_opt.debug, "%s: blocks = %i\n", __FILE__, acg.cg_ndblk); p = cg_blksfree(&acg); for (block = 0; block < acg.cg_ndblk; block++){ if (isset(p, block)) { pc_clear_bit(total_block, bitmap); bfree++; log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap is free %lli\n", __FILE__, block); } else { pc_set_bit(total_block, bitmap); bused++; log_mesg(3, 0, 0, fs_opt.debug, "%s: bitmap is used %lli\n", __FILE__, block); } total_block++; update_pui(&bprog, total_block, total_block,done); } log_mesg(1, 0, 0, fs_opt.debug, "%s: read bitmap done\n", __FILE__); } fs_close(); log_mesg(1, 0, 0, fs_opt.debug, "%s: total used = %lli, total free = %lli\n", __FILE__, bused, bfree); update_pui(&bprog, 1, 1, 1); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, ufs_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = afs.fs_fsize; image_hdr->usedblocks = get_used_block(); switch (disk.d_ufs) { case 2: image_hdr->totalblock = (unsigned long long)afs.fs_size; image_hdr->device_size = afs.fs_fsize*afs.fs_size; break; case 1: image_hdr->totalblock = (unsigned long long)afs.fs_old_size; image_hdr->device_size = afs.fs_fsize*afs.fs_old_size; break; default: break; } fs_close(); } /// get_used_block - get FAT used blocks static unsigned long long get_used_block() { unsigned long long block, bused = 0, bfree = 0; int i = 0, start = 0, bit_size = 1; char *p; /// read group while ((i = cgread(&disk)) != 0) { log_mesg(2, 0, 0, fs_opt.debug, "%s: \ncg = %d\n", __FILE__, disk.d_lcg); log_mesg(2, 0, 0, fs_opt.debug, "%s: blocks = %i\n", __FILE__, acg.cg_ndblk); p = cg_blksfree(&acg); for (block = 0; block < acg.cg_ndblk; block++){ if (isset(p, block)) { bfree++; } else { bused++; } } } log_mesg(1, 0, 0, fs_opt.debug, "%s: total used = %lli, total free = %lli\n", __FILE__, bused, bfree); return bused; } partclone-0.2.51/src/ufsclone.h000066400000000000000000000014611200565264100163470ustar00rootroot00000000000000/** * reiser4clone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiser4 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); /// return used block count static unsigned long long get_used_block(); partclone-0.2.51/src/version.h000066400000000000000000000004361200565264100162170ustar00rootroot00000000000000/* DO NOT EDIT THIS FILE - IT IS REGENERATED AT EVERY COMPILE - * IT GIVES BETTER TRACKING OF DEVELOPMENT VERSIONS * WHETHER THEY ARE BUILT BY OTHERS OR DURING DEVELOPMENT OR FOR THE * OFFICIAL PARTCLONE RELEASES. */ #define git_version "8274a6e15d3f90ed9fd298616f15ae776840901d" partclone-0.2.51/src/vmfs5clone.c000066400000000000000000000260001200565264100166010ustar00rootroot00000000000000/** * vmfsclone.c - part of Partclone project * part of source from vmfs-tools/fsck.c * * Copyright (c) 2007~ Thomas Tsai * * read vmfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include "partclone.h" #include "reiser4clone.h" #include "progress.h" #include "fs_common.h" vmfs_fs_t *fs; vmfs_dir_t *root_dir; char *EXECNAME = "partclone.vmfs"; extern fs_cmd_opt fs_opt; unsigned long *blk_bitmap; progress_bar prog; /// progress_bar structure defined in progress.h unsigned long long checked; void *thread_update_bitmap_pui(void *arg); int bitmap_done = 0; /* Forward declarations */ typedef struct vmfs_dir_map vmfs_dir_map_t; typedef struct vmfs_blk_map vmfs_blk_map_t; /* Directory mapping */ struct vmfs_dir_map { char *name; uint32_t blk_id; int is_dir; vmfs_blk_map_t *blk_map; }; /* * Block mapping, which allows to keep track of inodes given a block number. * Used for troubleshooting/debugging/future dump. */ #define VMFS_BLK_MAP_BUCKETS 512 #define VMFS_BLK_MAP_MAX_INODES 32 struct vmfs_blk_map { uint32_t blk_id; union { uint32_t inode_id[VMFS_BLK_MAP_MAX_INODES]; vmfs_inode_t inode; }; vmfs_dir_map_t *dir_map; u_int ref_count; u_int nlink; int status; vmfs_blk_map_t *prev,*next; }; typedef struct vmfs_dump_info vmfs_dump_info_t; struct vmfs_dump_info { vmfs_blk_map_t *blk_map[VMFS_BLK_MAP_BUCKETS]; u_int blk_count[VMFS_BLK_TYPE_MAX]; vmfs_dir_map_t *dir_map; }; /* Allocate a directory map structure */ vmfs_dir_map_t *vmfs_dir_map_alloc(const char *name,uint32_t blk_id) { vmfs_dir_map_t *map; if (!(map = calloc(1,sizeof(*map)))) return NULL; if (!(map->name = strdup(name))) { free(map); return NULL; } map->blk_id = blk_id; return map; } /* Create the root directory mapping */ vmfs_dir_map_t *vmfs_dir_map_alloc_root(void) { vmfs_dir_map_t *map; uint32_t root_blk_id; root_blk_id = VMFS_BLK_FD_BUILD(0,0,0); if (!(map = vmfs_dir_map_alloc("/",root_blk_id))) return NULL; return map; } /* Hash function for a block ID */ static inline u_int vmfs_block_map_hash(uint32_t blk_id) { return(blk_id ^ (blk_id >> 5)); } /* Find a block mapping */ vmfs_blk_map_t *vmfs_block_map_find(vmfs_blk_map_t **ht,uint32_t blk_id) { vmfs_blk_map_t *map; u_int bucket; bucket = vmfs_block_map_hash(blk_id) % VMFS_BLK_MAP_BUCKETS; for(map=ht[bucket];map;map=map->next) if (map->blk_id == blk_id) return map; return NULL; } /* Get a block mapping */ vmfs_blk_map_t *vmfs_block_map_get(vmfs_blk_map_t **ht,uint32_t blk_id) { vmfs_blk_map_t *map; u_int bucket; if ((map = vmfs_block_map_find(ht,blk_id)) != NULL) return map; if (!(map = calloc(1,sizeof(*map)))) return NULL; bucket = vmfs_block_map_hash(blk_id) % VMFS_BLK_MAP_BUCKETS; map->blk_id = blk_id; map->prev = NULL; map->next = ht[bucket]; ht[bucket] = map; return map; } /* print block id pos */ unsigned long long print_pos_by_id (const vmfs_fs_t *fs, uint32_t blk_id) { unsigned long long pos = 0; uint32_t blk_type = VMFS_BLK_TYPE(blk_id); unsigned long long current; switch(blk_type) { /* File Block */ case VMFS_BLK_TYPE_FB: pos = (unsigned long long)VMFS_BLK_FB_ITEM(blk_id) * vmfs_fs_get_blocksize(fs); /* reference vmfs-tools/libvmfs/vmfs_volume.c pos += vol->vmfs_base + 0x1000000; */ pos += 1048576 + 16777216; checked++; break; /* Sub-Block */ case VMFS_BLK_TYPE_SB: pos = vmfs_bitmap_get_item_pos(fs->sbc, VMFS_BLK_SB_ENTRY(blk_id), VMFS_BLK_SB_ITEM(blk_id)); checked++; break; /* Pointer Block */ case VMFS_BLK_TYPE_PB: pos = vmfs_bitmap_get_item_pos(fs->pbc,VMFS_BLK_PB_ENTRY(blk_id), VMFS_BLK_PB_ITEM(blk_id)); checked++; break; /* File Descriptor / Inode */ case VMFS_BLK_TYPE_FD: pos = vmfs_bitmap_get_item_pos(fs->fdc,VMFS_BLK_FD_ENTRY(blk_id), VMFS_BLK_FD_ITEM(blk_id)); checked++; break; default: log_mesg(0, 0, 0, fs_opt.debug, "Unsupported block type 0x%2.2x\n", blk_type); //fprintf(stderr,"Unsupported block type 0x%2.2x\n",blk_type); } current = pos/vmfs_fs_get_blocksize(fs); log_mesg(3, 0, 0, fs_opt.debug, "Blockid = 0x%8.8x, Type = 0x%2.2x, Pos: %lli, bitmapid: %lli, c: %lli\n", blk_id, blk_type, pos, current, checked); pc_set_bit(current, blk_bitmap); } /* Store block mapping of an inode */ static void vmfs_dump_store_block(const vmfs_inode_t *inode, uint32_t pb_blk, uint32_t blk_id, void *opt_arg) { vmfs_blk_map_t **ht = opt_arg; vmfs_blk_map_t *map; if (!(map = vmfs_block_map_get(ht,blk_id))) return; if (map->ref_count < VMFS_BLK_MAP_MAX_INODES) map->inode_id[map->ref_count] = inode->id; map->ref_count++; map->status = vmfs_block_get_status(inode->fs,blk_id); if (map->status <= 0){ log_mesg(0, 0, 0, fs_opt.debug, "%s: Block 0x%8.8x is used but not allocated.\n", __FILE__, blk_id); } else print_pos_by_id(inode->fs, blk_id); } /* Store inode info */ static int vmfs_dump_store_inode(const vmfs_fs_t *fs,vmfs_blk_map_t **ht, const vmfs_inode_t *inode) { vmfs_blk_map_t *map; if (!(map = vmfs_block_map_get(ht,inode->id))) return(-1); memcpy(&map->inode,inode,sizeof(*inode)); map->status = vmfs_block_get_status(fs,inode->id); if (map->status <= 0){ log_mesg(0, 0, 0, fs_opt.debug, "%s: Block 0x%8.8x is used but not allocated.\n", __FILE__, inode->id); } else print_pos_by_id(fs, inode->id); } /* dump other bitmap */ void dump_bitmaps (vmfs_bitmap_t *b,uint32_t addr, void *opt) { vmfs_fs_t *fs = opt; uint32_t entry,item; uint32_t blk_id; entry = addr / b->bmh.items_per_bitmap_entry; item = addr % b->bmh.items_per_bitmap_entry; blk_id = VMFS_BLK_SB_BUILD(entry, item, 0); //fprintf(stderr, "%s %s addr %i blkid %i\n", __FILE__, __func__, addr, blk_id); print_pos_by_id(fs, blk_id); } /* Initialize dump structures */ static void vmfs_dump_init(vmfs_dump_info_t *fi) { memset(fi,0,sizeof(*fi)); fi->dir_map = vmfs_dir_map_alloc_root(); } /// open device static void fs_open(char* device){ vmfs_lvm_t *lvm; vmfs_flags_t flags; char *mdev[] = {device, NULL}; char *next = NULL; vmfs_host_init(); flags.packed = 0; flags.allow_missing_extents = 1; log_mesg(3, 0, 0, fs_opt.debug, "%s: device %s\n", __FILE__, device); #ifdef VMFS5_ZLA_BASE if (!(fs=vmfs_fs_open(&mdev, flags))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open volume.\n", __FILE__); } #else if (!(lvm = vmfs_lvm_create(flags))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to create LVM structure\n", __FILE__); } if (vmfs_lvm_add_extent(lvm, vmfs_vol_open(device, flags)) == -1) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open device/file \"%s\".\n", __FILE__, device); } if (!(fs = vmfs_fs_create(lvm))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open filesystem\n", __FILE__); } if (vmfs_fs_open(fs) == -1) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open volume.\n", __FILE__); } #endif if (!(root_dir = vmfs_dir_open_from_blkid(fs,VMFS_BLK_FD_BUILD(0,0,0)))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open root directory\n", __FILE__); } } /// close device static void fs_close(){ vmfs_dir_close(root_dir); vmfs_fs_close(fs); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { unsigned long long used_block = 0, free_block = 0, err_block = 0, prog_total = 0; uint32_t total = 0; int status = 0; int start = 0; int bit_size = 1; vmfs_dump_info_t dump_info; vmfs_inode_t inode; vmfs_bitmap_header_t *fdc_bmp; uint32_t entry,item; int i; int bres; pthread_t prog_bitmap_thread; fs_open(device); vmfs_dump_init(&dump_info); blk_bitmap = bitmap; /// init progress progress_init(&prog, start, image_hdr.usedblocks, image_hdr.usedblocks, BITMAP, bit_size); checked = 0; /** * thread to print progress */ bres = pthread_create(&prog_bitmap_thread, NULL, thread_update_bitmap_pui, NULL); fdc_bmp = &fs->fdc->bmh; log_mesg(3, 0, 0, fs_opt.debug, "Scanning %u FDC entries...\n",fdc_bmp->total_items); for(i=0;itotal_items;i++) { entry = i / fdc_bmp->items_per_bitmap_entry; item = i % fdc_bmp->items_per_bitmap_entry; /* Skip undefined/deleted inodes */ if ((vmfs_inode_get(fs,VMFS_BLK_FD_BUILD(entry,item,0),&inode) == -1) || !inode.nlink) continue; inode.fs = fs; vmfs_dump_store_inode(fs,dump_info.blk_map,&inode); vmfs_inode_foreach_block(&inode,vmfs_dump_store_block,dump_info.blk_map); } log_mesg(3, 0, 0, fs_opt.debug, "fdc checked block %lli\n", checked); vmfs_bitmap_foreach(fs->fbb,dump_bitmaps,fs); log_mesg(3, 0, 0, fs_opt.debug, "fbb checked block %lli\n", checked); vmfs_bitmap_foreach(fs->sbc,dump_bitmaps,fs); log_mesg(3, 0, 0, fs_opt.debug, "sbc checked block %lli\n", checked); vmfs_bitmap_foreach(fs->pbc,dump_bitmaps,fs); log_mesg(3, 0, 0, fs_opt.debug, "pbc checked block %lli\n", checked); fs_close(); bitmap_done = 1; update_pui(&prog, 1, 1, 1); log_mesg(3, 0, 0, fs_opt.debug, "checked block %lli\n", checked); log_mesg(0, 0, 0, fs_opt.debug, "%s: Used:%lld, Free:%lld, Status err:%lld\n", __FILE__, used_block, free_block, err_block); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { uint32_t alloc,total; uint32_t fdc_allocated, fbb_allocated, sbc_allocated, pbc_allocated; fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, vmfs_MAGIC, FS_MAGIC_SIZE); total = fs->fbb->bmh.total_items; fdc_allocated = vmfs_bitmap_allocated_items(fs->fdc); fbb_allocated = vmfs_bitmap_allocated_items(fs->fbb); sbc_allocated = vmfs_bitmap_allocated_items(fs->pbc); pbc_allocated = vmfs_bitmap_allocated_items(fs->pbc); alloc = fdc_allocated + fbb_allocated + sbc_allocated + pbc_allocated; log_mesg(3, 0, 0, fs_opt.debug, "allocated fdc %u\n", fdc_allocated); log_mesg(3, 0, 0, fs_opt.debug, "allocated fbb %u\n", fbb_allocated); log_mesg(3, 0, 0, fs_opt.debug, "allocated sbc %u\n", sbc_allocated); log_mesg(3, 0, 0, fs_opt.debug, "allocated pbc %u\n", pbc_allocated); image_hdr->block_size = vmfs_fs_get_blocksize(fs); image_hdr->totalblock = total; image_hdr->usedblocks = alloc; image_hdr->device_size = (vmfs_fs_get_blocksize(fs)*total); fs_close(); } void *thread_update_bitmap_pui(void *arg){ while (bitmap_done == 0) { update_pui(&prog, checked, checked, 0); sleep(1); } pthread_exit("exit"); } partclone-0.2.51/src/vmfsclone.c000066400000000000000000000072141200565264100165220ustar00rootroot00000000000000/** * vmfsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read vmfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include "partclone.h" #include "reiser4clone.h" #include "progress.h" #include "fs_common.h" vmfs_fs_t *fs; vmfs_dir_t *root_dir; char *EXECNAME = "partclone.vmfs"; extern fs_cmd_opt fs_opt; /// open device static void fs_open(char* device){ vmfs_lvm_t *lvm; vmfs_flags_t flags; char *mdev[] = {device, NULL}; char *next = NULL; vmfs_host_init(); flags.packed = 0; flags.allow_missing_extents = 1; log_mesg(3, 0, 0, fs_opt.debug, "%s: device %s\n", __FILE__, device); #ifdef VMFS5_ZLA_BASE if (!(fs=vmfs_fs_open(&mdev, flags))) { #else if (!(lvm = vmfs_lvm_create(flags))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to create LVM structure\n", __FILE__); } if (vmfs_lvm_add_extent(lvm, vmfs_vol_open(device, flags)) == -1) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open device/file \"%s\".\n", __FILE__, device); } if (!(fs = vmfs_fs_create(lvm))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open filesystem\n", __FILE__); } if (vmfs_fs_open(fs) == -1) { #endif log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open volume.\n", __FILE__); } if (!(root_dir = vmfs_dir_open_from_blkid(fs,VMFS_BLK_FD_BUILD(0,0,0)))) { log_mesg(0, 1, 1, fs_opt.debug, "%s: Unable to open root directory\n", __FILE__); } } /// close device static void fs_close(){ vmfs_dir_close(root_dir); vmfs_fs_close(fs); } /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { uint32_t current = 0, used_block = 0, free_block = 0, err_block = 0, total = 0, alloc = 0; int status = 0; int start = 0; int bit_size = 1; fs_open(device); /// init progress progress_bar prog; /// progress_bar structure defined in progress.h progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); total = fs->fbb->bmh.total_items; alloc = vmfs_bitmap_allocated_items(fs->fbb); for(current = 0; current < total; current++){ status = vmfs_block_get_status(fs, VMFS_BLK_FB_BUILD(current,0)); if (status == -1) { err_block++; pc_clear_bit(current, bitmap); } else if (status == 1){ used_block++; pc_set_bit(current, bitmap); } else if (status == 0){ free_block++; pc_clear_bit(current, bitmap); } log_mesg(2, 0, 0, fs_opt.debug, "%s: Block 0x%8.8x status: %i\n", __FILE__, current, status); update_pui(&prog, current, current, 0); } fs_close(); update_pui(&prog, 1, 1, 1); log_mesg(0, 0, 0, fs_opt.debug, "%s: Used:%lld, Free:%lld, Status err:%lld\n", __FILE__, used_block, free_block, err_block); } /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr) { uint32_t alloc,total; fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, vmfs_MAGIC, FS_MAGIC_SIZE); total = fs->fbb->bmh.total_items; alloc = vmfs_bitmap_allocated_items(fs->fbb); image_hdr->block_size = vmfs_fs_get_blocksize(fs); image_hdr->totalblock = total; image_hdr->usedblocks = alloc; image_hdr->device_size = (vmfs_fs_get_blocksize(fs)*total); fs_close(); } partclone-0.2.51/src/vmfsclone.h000066400000000000000000000013501200565264100165220ustar00rootroot00000000000000/** * reiser4clone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read reiser4 super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/src/xfsclone.c000066400000000000000000000406211200565264100163460ustar00rootroot00000000000000/** * xfsclone.c - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read xfs super block and bitmap, reference xfs_copy.c * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include #include #include #include #include #include #include #include #include #include #include "partclone.h" #include "xfsclone.h" #include "progress.h" #include "fs_common.h" char *EXECNAME = "partclone.xfs"; extern fs_cmd_opt fs_opt; int source_fd = -1; int first_residue; xfs_mount_t *mp; xfs_mount_t mbuf; libxfs_init_t xargs; unsigned int source_blocksize; /* source filesystem blocksize */ unsigned int source_sectorsize; /* source disk sectorsize */ #define rounddown(x, y) (((x)/(y))*(y)) static void set_bitmap(unsigned long* bitmap, uint64_t pos, int length) { uint64_t pos_block; uint64_t block_count; uint64_t block; pos_block = pos/source_blocksize; block_count = length/source_blocksize; for (block = pos_block; block < pos_block+block_count; block++){ pc_set_bit(block, bitmap); log_mesg(3, 0, 0, fs_opt.debug, "block %i is used\n", block); } } static void fs_open(char* device) { int open_flags; struct stat statbuf; int source_is_file = 0; xfs_buf_t *sbp; xfs_sb_t *sb; int tmp_residue; /* open up source -- is it a file? */ open_flags = O_RDONLY; if ((source_fd = open(device, open_flags)) < 0) { log_mesg(0, 1, 1, fs_opt.debug, "Couldn't open source partition %s\n", device); }else{ log_mesg(0, 0, 0, fs_opt.debug, "Open %s successfully", device); } if (fstat(source_fd, &statbuf) < 0) { log_mesg(0, 1, 1, fs_opt.debug, "Couldn't stat source partition\n"); } if (S_ISREG(statbuf.st_mode)){ log_mesg(1, 0, 0, fs_opt.debug, "source is file\n"); source_is_file = 1; } /* prepare the libxfs_init structure */ memset(&xargs, 0, sizeof(xargs)); xargs.isdirect = LIBXFS_DIRECT; xargs.isreadonly = LIBXFS_ISREADONLY; if (source_is_file) { xargs.dname = device; xargs.disfile = 1; } else xargs.volname = device; if (libxfs_init(&xargs) == 0) { log_mesg(0, 1, 1, fs_opt.debug, "libxfs_init error. Please repaire %s partition.\n", device); } /* prepare the mount structure */ sbp = libxfs_readbuf(xargs.ddev, XFS_SB_DADDR, 1, 0); memset(&mbuf, 0, sizeof(xfs_mount_t)); sb = &mbuf.m_sb; libxfs_sb_from_disk(sb, XFS_BUF_TO_SBP(sbp)); mp = libxfs_mount(&mbuf, sb, xargs.ddev, xargs.logdev, xargs.rtdev, 1); if (mp == NULL) { log_mesg(0, 1, 1, fs_opt.debug, "%s filesystem failed to initialize\nAborting.\n", device); } else if (mp->m_sb.sb_inprogress) { log_mesg(0, 1, 1, fs_opt.debug, "%s filesystem failed to initialize\nAborting(inprogress).\n", device); } else if (mp->m_sb.sb_logstart == 0) { log_mesg(0, 1, 1, fs_opt.debug, "%s has an external log.\nAborting.\n", device); } else if (mp->m_sb.sb_rextents != 0) { log_mesg(0, 1, 1, fs_opt.debug, "%s has a real-time section.\nAborting.\n", device); } source_blocksize = mp->m_sb.sb_blocksize; source_sectorsize = mp->m_sb.sb_sectsize; log_mesg(2, 0, 0, fs_opt.debug, "source_blocksize %i source_sectorsize = %i\n", source_blocksize, source_sectorsize); if (source_blocksize > source_sectorsize) { /* get number of leftover sectors in last block of ag header */ tmp_residue = ((XFS_AGFL_DADDR(mp) + 1) * source_sectorsize) % source_blocksize; first_residue = (tmp_residue == 0) ? 0 : source_blocksize - tmp_residue; log_mesg(2, 0, 0, fs_opt.debug, "first_residue %i tmp_residue %i\n", first_residue, tmp_residue); } else if (source_blocksize == source_sectorsize) { first_residue = 0; } else { log_mesg(0, 1, 1, fs_opt.debug, "Error: filesystem block size is smaller than the disk sectorsize.\nAborting XFS copy now.\n"); } /* end of xfs open */ log_mesg(3, 0, 0, fs_opt.debug, "%s: blcos size= %i\n", __FILE__, mp->m_sb.sb_blocksize); log_mesg(3, 0, 0, fs_opt.debug, "%s: total b= %lli\n", __FILE__, mp->m_sb.sb_dblocks); log_mesg(3, 0, 0, fs_opt.debug, "%s: free block= %lli\n", __FILE__, mp->m_sb.sb_fdblocks); log_mesg(3, 0, 0, fs_opt.debug, "%s: used block= %lli\n", __FILE__, (mp->m_sb.sb_dblocks - mp->m_sb.sb_fdblocks)); log_mesg(3, 0, 0, fs_opt.debug, "%s: device size= %lli\n", __FILE__, (mp->m_sb.sb_blocksize * mp->m_sb.sb_dblocks)); } static void fs_close() { libxfs_device_close(xargs.ddev); log_mesg(0, 0, 0, fs_opt.debug, "fs_close\n"); } extern void initial_image_hdr(char* device, image_head* image_hdr) { fs_open(device); strncpy(image_hdr->magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE); strncpy(image_hdr->fs, xfs_MAGIC, FS_MAGIC_SIZE); image_hdr->block_size = mp->m_sb.sb_blocksize; image_hdr->totalblock = mp->m_sb.sb_dblocks; image_hdr->usedblocks = mp->m_sb.sb_dblocks - mp->m_sb.sb_fdblocks; image_hdr->device_size = (image_hdr->totalblock * image_hdr->block_size); log_mesg(1, 0, 0, fs_opt.debug, "%s: blcos size= %i\n", __FILE__, mp->m_sb.sb_blocksize); log_mesg(1, 0, 0, fs_opt.debug, "%s: total b= %lli\n", __FILE__, mp->m_sb.sb_dblocks); log_mesg(1, 0, 0, fs_opt.debug, "%s: free block= %lli\n", __FILE__, mp->m_sb.sb_fdblocks); log_mesg(1, 0, 0, fs_opt.debug, "%s: used block= %lli\n", __FILE__, (mp->m_sb.sb_dblocks - mp->m_sb.sb_fdblocks)); log_mesg(1, 0, 0, fs_opt.debug, "%s: device size= %lli\n", __FILE__, (mp->m_sb.sb_blocksize*mp->m_sb.sb_dblocks)); fs_close(); } extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui) { xfs_agnumber_t agno = 0; xfs_agblock_t first_agbno; xfs_agnumber_t num_ags; ag_header_t ag_hdr; xfs_daddr_t read_ag_off; int read_ag_length; void *read_ag_buf = NULL; xfs_off_t read_ag_position; /* xfs_types.h: typedef __s64 */ uint64_t sk, res, s_pos = 0; void *btree_buf_data = NULL; int btree_buf_length; xfs_off_t btree_buf_position; xfs_agblock_t bno; uint current_level; uint btree_levels; xfs_daddr_t begin, next_begin, ag_begin, new_begin, ag_end; /* xfs_types.h: typedef __s64*/ xfs_off_t pos; xfs_alloc_ptr_t *ptr; xfs_alloc_rec_t *rec_ptr; int length; int i; uint64_t size, sizeb; xfs_off_t w_position; int w_length; int wblocks; int w_size = 1 * 1024 * 1024; uint64_t numblocks = 0; xfs_off_t logstart, logend; xfs_off_t logstart_pos, logend_pos; int log_length; struct xfs_btree_block *block; uint64_t current_block, block_count, prog_cur_block = 0; int start = 0; int bit_size = 1; progress_bar prog; uint64_t bused = 0; uint64_t bfree = 0; /// init progress progress_init(&prog, start, image_hdr.totalblock, image_hdr.totalblock, BITMAP, bit_size); fs_open(device); first_agbno = (((XFS_AGFL_DADDR(mp) + 1) * source_sectorsize) + first_residue) / source_blocksize; num_ags = mp->m_sb.sb_agcount; log_mesg(1, 0, 0, fs_opt.debug, "ags = %i\n", num_ags); for (agno = 0; agno < num_ags ; agno++) { /* read in first blocks of the ag */ /* initial settings */ log_mesg(2, 0, 0, fs_opt.debug, "read ag %i header\n", agno); read_ag_off = XFS_AG_DADDR(mp, agno, XFS_SB_DADDR); read_ag_length = first_agbno * source_blocksize; read_ag_position = (xfs_off_t) read_ag_off * (xfs_off_t) BBSIZE; read_ag_buf = malloc(read_ag_length); memset(read_ag_buf, 0, read_ag_length); log_mesg(2, 0, 0, fs_opt.debug, "seek to read_ag_position %lli\n", read_ag_position); sk = lseek(source_fd, read_ag_position, SEEK_SET); current_block = (sk/source_blocksize); block_count = (read_ag_length/source_blocksize); set_bitmap(bitmap, sk, read_ag_length); log_mesg(2, 0, 0, fs_opt.debug, "read ag header fd = %llu(%i), length = %i(%i)\n", sk, current_block, read_ag_length, block_count); if ((res = read(source_fd, read_ag_buf, read_ag_length)) < 0) { log_mesg(1, 0, 1, fs_opt.debug, "read failure at offset %lld\n", read_ag_position); } ag_hdr.xfs_sb = (xfs_dsb_t *) (read_ag_buf); ASSERT(be32_to_cpu(ag_hdr.xfs_sb->sb_magicnum) == XFS_SB_MAGIC); ag_hdr.xfs_agf = (xfs_agf_t *) (read_ag_buf + source_sectorsize); ASSERT(be32_to_cpu(ag_hdr.xfs_agf->agf_magicnum) == XFS_AGF_MAGIC); ag_hdr.xfs_agi = (xfs_agi_t *) (read_ag_buf + 2 * source_sectorsize); ASSERT(be32_to_cpu(ag_hdr.xfs_agi->agi_magicnum) == XFS_AGI_MAGIC); ag_hdr.xfs_agfl = (xfs_agfl_t *) (read_ag_buf + 3 * source_sectorsize); log_mesg(2, 0, 0, fs_opt.debug, "ag header read ok\n"); /* save what we need (agf) in the btree buffer */ btree_buf_data = malloc(source_blocksize); memset(btree_buf_data, 0, source_blocksize); memmove(btree_buf_data, ag_hdr.xfs_agf, source_sectorsize); ag_hdr.xfs_agf = (xfs_agf_t *) btree_buf_data; btree_buf_length = source_blocksize; ///* traverse btree until we get to the leftmost leaf node */ bno = be32_to_cpu(ag_hdr.xfs_agf->agf_roots[XFS_BTNUM_BNOi]); current_level = 0; btree_levels = be32_to_cpu(ag_hdr.xfs_agf->agf_levels[XFS_BTNUM_BNOi]); ag_end = XFS_AGB_TO_DADDR(mp, agno, be32_to_cpu(ag_hdr.xfs_agf->agf_length) - 1) + source_blocksize / BBSIZE; for (;;) { /* none of this touches the w_buf buffer */ current_level++; btree_buf_position = pos = (xfs_off_t)XFS_AGB_TO_DADDR(mp,agno,bno) << BBSHIFT; btree_buf_length = source_blocksize; sk = lseek(source_fd, btree_buf_position, SEEK_SET); current_block = (sk/source_blocksize); block_count = (btree_buf_length/source_blocksize); set_bitmap(bitmap, sk, btree_buf_length); log_mesg(2, 0, 0, fs_opt.debug, "read btree sf = %llu(%i), length = %i(%i)\n", sk, current_block, btree_buf_length, block_count); read(source_fd, btree_buf_data, btree_buf_length); block = (struct xfs_btree_block *)((char *)btree_buf_data + pos - btree_buf_position); if (be16_to_cpu(block->bb_level) == 0) break; ptr = XFS_ALLOC_PTR_ADDR(mp, block, 1, mp->m_alloc_mxr[1]); bno = be32_to_cpu(ptr[0]); } log_mesg(2, 0, 0, fs_opt.debug, "btree read done\n"); /* align first data copy but don't overwrite ag header */ pos = read_ag_position >> BBSHIFT; length = read_ag_length >> BBSHIFT; next_begin = pos + length; ag_begin = next_begin; ///* handle the rest of the ag */ for (;;) { if (be16_to_cpu(block->bb_level) != 0) { log_mesg(0, 1, 1, fs_opt.debug, "WARNING: source filesystem inconsistent.\nA leaf btree rec isn't a leaf. Aborting now.\n"); } rec_ptr = XFS_ALLOC_REC_ADDR(mp, block, 1); for (i = 0; i < be16_to_cpu(block->bb_numrecs); i++, rec_ptr++) { /* calculate in daddr's */ begin = next_begin; /* * protect against pathological case of a * hole right after the ag header in a * mis-aligned case */ if (begin < ag_begin) begin = ag_begin; /* * round size up to ensure we copy a * range bigger than required */ log_mesg(3, 0, 0, fs_opt.debug, "XFS_AGB_TO_DADDR = %llu, agno = %i, be32_to_cpu=%llu\n", XFS_AGB_TO_DADDR(mp, agno, be32_to_cpu(rec_ptr->ar_startblock)), agno, be32_to_cpu(rec_ptr->ar_startblock)); sizeb = XFS_AGB_TO_DADDR(mp, agno, be32_to_cpu(rec_ptr->ar_startblock)) - begin; size = roundup(sizeb < 0) { /* copy extent */ log_mesg(2, 0, 0, fs_opt.debug, "copy extent\n"); w_position = (xfs_off_t)begin << BBSHIFT; while (size > 0) { /* * let lower layer do alignment */ if (size > w_size) { w_length = w_size; size -= w_size; sizeb -= wblocks; numblocks += wblocks; } else { w_length = size; numblocks += sizeb; size = 0; } //read_wbuf(source_fd, &w_buf, mp); sk = lseek(source_fd, w_position, SEEK_SET); current_block = (sk/source_blocksize); block_count = (w_length/source_blocksize); set_bitmap(bitmap, sk, w_length); log_mesg(2, 0, 0, fs_opt.debug, "read ext sourcefd to w_buf source_fd=%llu(%i), length=%i(%i)\n", sk, current_block, w_length, block_count); sk = lseek(source_fd, w_length, SEEK_CUR); w_position += w_length; } } /* round next starting point down */ new_begin = XFS_AGB_TO_DADDR(mp, agno, be32_to_cpu(rec_ptr->ar_startblock) + be32_to_cpu(rec_ptr->ar_blockcount)); next_begin = rounddown(new_begin, source_sectorsize >> BBSHIFT); } if (be32_to_cpu(block->bb_u.s.bb_rightsib) == NULLAGBLOCK){ log_mesg(2, 0, 0, fs_opt.debug, "NULLAGBLOCK\n"); break; } /* read in next btree record block */ btree_buf_position = pos = (xfs_off_t)XFS_AGB_TO_DADDR(mp, agno, be32_to_cpu(block->bb_u.s.bb_rightsib)) << BBSHIFT; btree_buf_length = source_blocksize; /* let read_wbuf handle alignment */ //read_wbuf(source_fd, &btree_buf, mp); sk = lseek(source_fd, btree_buf_position, SEEK_SET); current_block = (sk/source_blocksize); block_count = (btree_buf_length/source_blocksize); set_bitmap(bitmap, sk, btree_buf_length); log_mesg(2, 0, 0, fs_opt.debug, "read btreebuf fd = %llu(%i), length = %i(%i) \n", sk, current_block, btree_buf_length, block_count); read(source_fd, btree_buf_data, btree_buf_length); block = (struct xfs_btree_block *)((char *) btree_buf_data + pos - btree_buf_position); ASSERT(be32_to_cpu(block->bb_magic) == XFS_ABTB_MAGIC); } /* * write out range of used blocks after last range * of free blocks in AG */ if (next_begin < ag_end) { begin = next_begin; sizeb = ag_end - begin; size = roundup(sizeb << BBSHIFT, source_sectorsize); if (size > 0) { /* copy extent */ w_position = (xfs_off_t) begin << BBSHIFT; while (size > 0) { /* * let lower layer do alignment */ if (size > w_size) { w_length = w_size; size -= w_size; sizeb -= wblocks; numblocks += wblocks; } else { w_length = size; numblocks += sizeb; size = 0; } sk = lseek(source_fd, w_position, SEEK_SET); current_block = (sk/source_blocksize); block_count = (w_length/source_blocksize); set_bitmap(bitmap, sk, w_length); log_mesg(2, 0, 0, fs_opt.debug, "read ext fd = %llu(%i), length = %i(%i)\n", sk, current_block, w_length, block_count); //read_wbuf(source_fd, &w_buf, mp); lseek(source_fd, w_length, SEEK_CUR); w_position += w_length; } } } log_mesg(2, 0, 0, fs_opt.debug, "write a clean log\n"); log_length = 1 * 1024 * 1024; logstart = XFS_FSB_TO_DADDR(mp, mp->m_sb.sb_logstart) << BBSHIFT; logstart_pos = rounddown(logstart, (xfs_off_t)log_length); if (logstart % log_length) { /* unaligned */ sk = lseek(source_fd, logstart_pos, SEEK_SET); current_block = (sk/source_blocksize); block_count = (log_length/source_blocksize); set_bitmap(bitmap, sk, log_length); log_mesg(2, 0, 0, fs_opt.debug, "read log start from %llu(%i) %i(%i)\n", sk, current_block, log_length, block_count); sk = lseek(source_fd, log_length, SEEK_CUR); } logend = XFS_FSB_TO_DADDR(mp, mp->m_sb.sb_logstart) << BBSHIFT; logend += XFS_FSB_TO_B(mp, mp->m_sb.sb_logblocks); logend_pos = rounddown(logend, (xfs_off_t)log_length); if (logend % log_length) { /* unaligned */ sk = lseek(source_fd, logend_pos, SEEK_SET); current_block = (sk/source_blocksize); block_count = (log_length/source_blocksize); set_bitmap(bitmap, sk, log_length); log_mesg(2, 0, 0, fs_opt.debug, "read log end from %llu(%i) %i(%i)\n", sk, current_block, log_length, block_count); sk = lseek(source_fd, log_length, SEEK_CUR); } log_mesg(2, 0, 0, fs_opt.debug, "write a clean log done\n"); prog_cur_block = image_hdr.totalblock/num_ags*(agno+1)-1; update_pui(&prog, prog_cur_block, prog_cur_block, 0); } for(current_block = 0; current_block <= image_hdr.totalblock; current_block++){ if(pc_test_bit(current_block, bitmap)) bused++; else bfree++; } log_mesg(0, 0, 0, fs_opt.debug, "bused = %lli, bfree = %lli\n", bused, bfree); fs_close(); update_pui(&prog, 1, 1, 1); } partclone-0.2.51/src/xfsclone.h000066400000000000000000000033741200565264100163570ustar00rootroot00000000000000/** * xfsclone.h - part of Partclone project * * Copyright (c) 2007~ Thomas Tsai * * read xfs super block and bitmap * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include /* * An on-disk allocation group header is composed of 4 structures, * each of which is 1 disk sector long where the sector size is at * least 512 bytes long (BBSIZE). * * There's one ag_header per ag and the superblock in the first ag * is the contains the real data for the entire filesystem (although * most of the relevant data won't change anyway even on a growfs). * * The filesystem superblock specifies the number of AG's and * the AG size. That splits the filesystem up into N pieces, * each of which is an AG and has an ag_header at the beginning. */ typedef struct ag_header { xfs_dsb_t *xfs_sb; /* superblock for filesystem or AG */ xfs_agf_t *xfs_agf; /* free space info */ xfs_agi_t *xfs_agi; /* free inode info */ xfs_agfl_t *xfs_agfl; /* AG freelist */ char *residue; int residue_length; } ag_header_t; /// update bitmap table static void set_bitmap(unsigned long* bitmap, uint64_t pos, int length); /// open device static void fs_open(char* device); /// close device static void fs_close(); /// readbitmap - read bitmap extern void readbitmap(char* device, image_head image_hdr, unsigned long* bitmap, int pui); /// read super block and write to image head extern void initial_image_hdr(char* device, image_head* image_hdr); partclone-0.2.51/test/000077500000000000000000000000001200565264100145465ustar00rootroot00000000000000partclone-0.2.51/test/extra_data_test000077500000000000000000000202711200565264100176510ustar00rootroot00000000000000#!/bin/bash set -e ## ex: ./extra_data_test -t /usr/share/base-files/ -s 256 -r data_pool/ -i data_pool/ -l data_pool/ -f ext3 ##default_value test_data_path="" raw_file_path="" logfile_path="" image_path="" test_data_md5="" keep_raw=0 partition_size=384 restore_device="" restore_file="restore_file_device" to_be_remove="" ## file system normal_fs="ext2 ext3 ext4 vfat exfat" featured_fs="$normal_fs jfs xfs reiserfs hfsplus" extra_fs="$featured_fs ntfs btrfs" read_only_fs="ufs reiser4 vmfs" mkfs_option_for_reiserfs='-f' mkfs_option_for_ntfs='-f -F' mkfs_option_for_jfs='-f' test_fs=$extra_fs USAGE() { cat << EOF $0 is DANGEROUS script to test partclone with root permission. This script will create and format loop device for clone, restore and some basic test. It's only for developer used. recognized flags are: -t, --test_data_path file in this path will be copy to generated loop device and prepare md5 file. -m, --test_data_md5 specify md5 file for test data set -s, --partition_size if -t option enabled, use dd to create raw file with this MB size -r, --raw_file_path path to collect all generated raw files -i, --image_path path to collect all generated partclone image files -l, --logfile_path path to collect all log files -f, --file-system what file system you want to test -k, --keep_raw_files Don't delete all generated raw file -h, --help show this help EOF } prefix_name(){ echo `date +%F-%H-%M` } abs_path(){ dy_path=$1 if [ -d $dy_path ]; then echo `cd $1;pwd` elif [ -f $dy_path ]; then bf=`basename $dy_path` dy_b_path=${dy_path%$bf} new_path=$(abs_path $dy_b_path) echo $new_path/$bf else echo "directory or file ($dy_path) not exist" >&2 exit 2 fi } check_option(){ while [ $# -gt 0 ]; do case "$1" in -t|--test_data_path) shift if [ -z "$(echo $1 |grep ^-.)" ]; then # skip the -xx option, in case test_data_path=$(abs_path $1) shift fi ;; -m|--test_data_md5) shift if [ -z "$(echo $1 |grep ^-.)" ]; then # skip the -xx option, in case test_data_md5=$(abs_path $1) shift fi ;; -s|--partition_size) shift if [ -z "$(echo $1 | grep ^-.)" ]; then partition_size="$1" shift fi ;; -r|--raw_file_path) shift if [ -z "$(echo $1 |grep ^-.)" ]; then raw_file_path=$(abs_path $1) shift fi ;; -k|--keep_raw_files) shift keep_raw=1 ;; -i|--image_path) shift if [ -z "$(echo $1 |grep ^-.)" ]; then image_path=$(abs_path $1) shift fi ;; -l|--logfile_path) shift if [ -z "$(echo $1 |grep ^-.)" ]; then logfile_path=$(abs_path $1) shift fi ;; -f|--file-system) shift if [ -z "$(echo $1 |grep ^-.)" ]; then manual_fs="$1" shift fi ;; -h|--help) USAGE >& 2 exit 2 ;; -*) echo "${0}: ${1}: invalid option" >&2 USAGE >& 2 exit 2 ;; *) break ;; esac done } generate_test_data_md5(){ cur_path=`pwd` target_md5=$test_data_md5 echo "create md5 file" cd $test_data_path find $test_data_path -type f -exec md5sum '{}' \; > $target_md5 cd $cur_path if [ -f $target_md5 ]; then echo "done" else echo "generate md5 file error" >&2 exit 2 fi } prepare_restore_device(){ if [ -f $raw_file_path/$restore_file ]; then echo "file exist" else echo "start create restore device" dd if=/dev/zero of=$raw_file_path/$restore_file bs=1M count=$partition_size echo "device generate done ($restore_device) " fi to_be_remove="$to_be_remove $raw_file_path/$restore_file" if [ -z $(losetup -a | grep $restore_file) ]; then restore_device=`losetup -f` echo "attach loop device" losetup $restore_device $raw_file_path/$restore_file echo "done" else echo "loop device exist" fi } prepare_data(){ fs=$1 target_file=$raw_file_path/source_raw_device.$fs target_mpt=$raw_file_path/mpt.$fs target_device=`losetup -f` echo "generate $target_file as loop device($target_device) for $fs test" dd if=/dev/zero of=$target_file bs=1M count=$partition_size losetup $target_device $target_file echo "format $target_device as $fs raw partition" mkfs.$fs `eval echo "$"mkfs_option_for_$fs""` $target_device echo "copy data to $target_mpt" mkdir -p $target_mpt mount $target_device $target_mpt rsync -avrl --delete $test_data_path $target_mpt sync umount $target_mpt sleep 2 losetup -d $target_device echo "prepare data done" } check_source(){ fs=$1 target_file=$raw_file_path/source_raw_device.$fs if [ -f $target_file ]; then target_device=`losetup -f` losetup $target_device $target_file echo $target_device else echo "can't find $target_file" >&2 exit 2 fi } check_image(){ fs=$1 img=$image_path/$fs-$(prefix_name).img [ -f $img ] && rm $img echo $img } check_target(){ fs=$1 img=$raw_file_path/$fs-$(prefix_name).restore.raw [ -f $img ] && rm $img echo $img } restore_device_file_check(){ target_md5=$test_data_md5 target_mpt=$raw_file_path/mpt.restore [ -f $target_md5 ] || exit 2 cur_path=`pwd` mkdir -p $target_mpt [ -d $target_mpt ] || exit 2 mount $restore_device $target_mpt cd $target_mpt ret=`md5sum --quiet -c $target_md5` cd $cur_path umount $target_mpt if [ -z "$ret" ]; then echo "test ok" else echo "test fail" echo $ret fi } restore_raw_data_check() { fs=$1 target_md5=$test_data_md5 target_mpt=$raw_file_path/mpt.restore [ -f $target_md5 ] || exit 2 cur_path=`pwd` mkdir -p $target_mpt [ -d $target_mpt ] || exit 2 mount -o loop $target_device $target_mpt cd $target_mpt ret=`md5sum --quiet -c $target_md5` cd $cur_path umount $target_mpt if [ -z "$ret" ]; then echo "$fs test ok" else echo "$fs test fail" echo $ret fi } clear_loop() { all_loop=$(losetup -a | awk {'print $1'} | sed 's/://') for loop in $all_loop; do losetup -d $loop done } #main check_option "$@" if [ ! "$UID" = "0" ]; then echo echo "You need to run this script \"`basename $0`\" as root." >&2 echo exit 1 fi clear_loop if [ -z "$test_fata_md5" ]; then touch "$raw_file_path/test_data.md5" test_data_md5=$(abs_path "$raw_file_path/test_data.md5") fi [ -z "$manual_fs" ] || test_fs=$manual_fs [ -z "$test_data_path" ] || generate_test_data_md5 for fs in $test_fs; do if [ ! -z "$test_data_path" ]; then echo "prepare test data for $fs" prepare_data $fs fi source_device=$(check_source $fs) partclone_img=$(check_image $fs) target_device=$(check_target $fs) logfile=$logfile_path/$fs-$(prefix_name).log ncurses="-N -f 1" debug="-d" to_be_remove="$to_be_remove $raw_file_path/source_raw_device.$fs" echo "clone $source_device to $partclone_img" partclone.$fs $debug $ncurses -c -s $source_device -O $partclone_img -L $logfile.clone echo "do image checking" partclone.chkimg -s $partclone_img -L $logfile.imgchk echo "restore $partclone_img to raw file $target_device" partclone.restore -s $partclone_img -o $target_device --restore_raw_file -L $logfile.restore-raw echo "md5 check" restore_raw_data_check $fs echo "restore $partclone_img to device $restore_device" prepare_restore_device partclone.$fs $debug $ncurses -r -s $partclone_img -o $restore_device -L $logfile.restore restore_device_file_check losetup -d $restore_device echo "dev-to-dev test" prepare_restore_device partclone.$fs $debug $ncurses -b -s $source_device -o $restore_device -L $logfile.dddev restore_device_file_check losetup -d $restore_device echo "detach all loop device ..." other_loop=$(losetup -a | grep $(basename $raw_file_path) | awk {'print $1'} | sed s/://) for loop_dev in $other_loop; do losetup -d $loop_dev done done clear_loop if [ $keep_raw == 0 ]; then echo "remove all raw files: $to_be_remove" remove_files=$(echo $to_be_remove | tr ' ' '\012'| uniq) rm -i $remove_files fi partclone-0.2.51/test/mini_clone_restore_test000077500000000000000000000030231200565264100214100ustar00rootroot00000000000000#!/bin/bash current_dir=`pwd` logfile='test.log' img='floppy.img' raw='floppy.raw' md5=$raw'.md5' dd_bs=1024 normal_size=$((1024*256)) floppy_size=1024 ## file system normal_fs="ext2 ext3 ext4 vfat exfat" featured_fs="$normal_fs jfs xfs reiserfs hfsplus" extra_fs="$featured_fs ufs vmfs reiser4 ntfs btrfs" mkfs_option_for_reiserfs='-f' mkfs_option_for_ntfs='-f -F' manual_fs=$1 test_fs=$featured_fs dd_count=$normal_size [ -n $manual_fs ] || test_fs=$manual_fs check_return_code(){ if [ $? != 0 ]; then echo "return code fail" exit fi } #main for fs in $test_fs; do echo "create raw file $raw" [ -f $raw ] && rm $raw dd if=/dev/zero of=$raw bs=$dd_bs count=$dd_count echo "format $raw as $fs raw partition" mkfs.$fs `eval echo "$"mkfs_option_for_$fs""` $raw echo "create md5 for $raw file" md5sum $raw > $md5 echo "clone $raw to $img" [ -f $img ] && rm $img partclone.$fs -d -N -c -s $raw -O $img -F -L $logfile check_return_code echo "do image checking" partclone.chkimg -s $img -L $logfile check_return_code echo "remove $raw" [ -f $raw ] && rm $raw echo "restore $img to $raw" partclone.restore -s $img -o $raw -C --restore_raw_file -F -L $logfile check_return_code echo "md5 check" ret=`md5sum --quiet -c $md5` if [ -z "$ret" ]; then echo "$fs test ok" echo "clear tmp files $img $raw $logfile $md5" rm $img $raw $logfile $md5 else echo "$fs test fail" echo "keep the files for bug report $img $raw $logfile $md5" fi done partclone-0.2.51/toolbox000077500000000000000000000051051200565264100152040ustar00rootroot00000000000000#! /bin/sh ## toolbox for the Partclone ## initial copied from VLC ## Authors: thomas thomas at nchc dot org dot tw ### ### Get a sane environment, just in case ### LC_ALL=C export LC_ALL LANG=C export LANG ## ## Give help ## help() { cat << EOF recognized flags are: --update-po update translation files --update-log update Changelog files from git --update-version generate src/version.h EOF exit 1 } ### ### argument check ### if test "$1" = "" then help fi case "$1" in --update-po) action=po ;; --update-log) action=changelog ;; --update-version) action=version ;; --help) help ;; *) echo "$0: unknown option $1" help ;; esac shift ## ## Update the potfiles because no one ever does it ## if test "${action}" = "po" then # find out the source files echo "WARNING: you should run \"make update-po\" instead!" >&2 cd po make update-po exit $? fi ## ## update Changelog from SVN ## #if test "${action}" = "changelog" #then # echo "Would you want to export svn log to ChangeLog(y/N)?" # read log # case "$log" in # [yY] | [Yy][Ee][Ss] ) # if which svn2cl 2>&1 >/dev/null ; then # echo "please input svn password to export svn log." # svn2cl --reparagraph --break-before-msg=2 # else # echo "WARNING: you should install subversion-tools firstly." # fi # ;; # esac # exit $? #fi # ## ## Create version file ## if test "${action}" = "version" then file="src/version.h" GIT_REPOSITORY=`git remote -v | grep partclone` GIT_REVISION=`git log -1 | grep commit | sed 's/commit //'` GIT_REVISION_UPSTREAM=`git log master -1 | grep commit | sed 's/commit //'` git_ver="none" if [ "${GIT_REPOSITORY}" = "" ]; then echo "not git repository?" exit 0 fi if [ "${GIT_REVISION_UPSTREAM}" != "" ]; then git_ver=$GIT_REVISION_UPSTREAM elif [ "${GIT_REVISION}" != "" ]; then git_ver=$GIT_REVISION else git_ver="none" fi if [ "$git_ver" != "none" ]; then echo "create ${file}" cat > ${file} << EOF /* DO NOT EDIT THIS FILE - IT IS REGENERATED AT EVERY COMPILE - * IT GIVES BETTER TRACKING OF DEVELOPMENT VERSIONS * WHETHER THEY ARE BUILT BY OTHERS OR DURING DEVELOPMENT OR FOR THE * OFFICIAL PARTCLONE RELEASES. */ #define git_version "$git_ver" EOF fi exit 0 fi if test "${action}" = "changelog" then # get source code from Jim Meyering at # http://git.mymadcat.com/index.php/p/tracker/source/tree/master/gitlog-to-changelog perl gitlog-to-changelog --since 1999-01-01 > ChangeLog fi