summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorjeff.liu <jeff.liu@oracle.com>2010-09-29 16:11:41 +0800
committerJim Meyering <meyering@redhat.com>2011-01-30 20:44:11 +0100
commit2db1433eabc847d9ad43e059764222e9b33233aa (patch)
tree52004fa39c3225022cbb77d501be0f3ffd309add /src/Makefile.am
parentf3e78eeff292fcc79814e62d015a271688e0212a (diff)
downloadcoreutils-2db1433eabc847d9ad43e059764222e9b33233aa.tar.xz
fiemap copy: add extent-scan.[ch], avoid a double-free and reorganize
Changes: ======== 1. fix write_zeros() per Jim's comments. 2. remove char const *fname from struct extent_scan. 3. change the signature of open_extent_scan() from "void open_extent_scan(struct extent_scan **scan)" to "void open_extent_scan(struct extent_scan *scan)" to avoid having to malloc the extent_scan variable; instead save it on the stack. 4. move close_extent_scan() from a function defined in extent-scan.c to extent-scan.h as a macro definition, but it does nothing for now, since initial extent scan defined at stack. 5. add a macro "free_extents_info()" defined at extent-scan.h to release the memory allocated to extent info which should be called combine with get_extents_info(), it just one line, so IMHO, define it as macro should be ok. * src/extent-scan.c: New file; functions to read "extents". * src/extent-scan.h: Header file of extent-scan.c. * src/Makefile.am: Reference it and link it to copy_source. * src/copy.c: Use the new functions and avoid double-free.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 986bd217f..9fd782214 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -450,7 +450,7 @@ uninstall-local:
fi; \
fi
-copy_sources = copy.c cp-hash.c
+copy_sources = copy.c cp-hash.c extent-scan.c
# Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid
# confusion with the `install' target. The install rule transforms `ginstall'