diff options
| author | Jim Meyering <meyering@redhat.com> | 2010-10-11 11:44:12 +0200 |
|---|---|---|
| committer | Jim Meyering <meyering@redhat.com> | 2011-01-22 12:16:43 +0100 |
| commit | 58c342c39a10cbc9b3283382729ab9db6c971aec (patch) | |
| tree | 73af164b5dedaac9589921be10d8ea48989e00b8 /src/extent-scan.h | |
| parent | rename extent_scan member (diff) | |
| download | coreutils-58c342c39a10cbc9b3283382729ab9db6c971aec.tar.gz coreutils-58c342c39a10cbc9b3283382729ab9db6c971aec.zip | |
rename extent-scan functions to start with extent_scan_
Diffstat (limited to 'src/extent-scan.h')
| -rw-r--r-- | src/extent-scan.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/extent-scan.h b/src/extent-scan.h index 0c9c199e3..3119c8df1 100644 --- a/src/extent-scan.h +++ b/src/extent-scan.h @@ -19,7 +19,7 @@ #ifndef EXTENT_SCAN_H # define EXTENT_SCAN_H -/* Structure used to reserve information of each extent. */ +/* Structure used to store information of each extent. */ struct extent_info { /* Logical offset of an extent. */ @@ -44,25 +44,27 @@ struct extent_scan /* How many extent info returned for a scan. */ uint32_t ei_count; - /* If true, fall back to a normal copy, either - set by the failure of ioctl(2) for FIEMAP or - lseek(2) with SEEK_DATA. */ + /* If true, fall back to a normal copy, either set by the + failure of ioctl(2) for FIEMAP or lseek(2) with SEEK_DATA. */ bool initial_scan_failed; - /* If ture, the total extent scan per file has been finished. */ + /* If true, the total extent scan per file has been finished. */ bool hit_final_extent; - /* Extent information. */ + /* Extent information: a malloc'd array of ei_count structs. */ struct extent_info *ext_info; }; void -open_extent_scan (int src_fd, struct extent_scan *scan); +extent_scan_init (int src_fd, struct extent_scan *scan); bool -get_extents_info (struct extent_scan *scan); +extent_scan_read (struct extent_scan *scan); -#define free_extents_info(ext_scan) free ((ext_scan)->ext_info) -#define close_extent_scan(ext_scan) /* empty */ +static inline void +extent_scan_free (struct extent_scan *scan) +{ + free (scan->ext_info); +} #endif /* EXTENT_SCAN_H */ |
