OSDN Git Service

Fix a few bugs related to dumping files.
authorChristopher Ferris <cferris@google.com>
Thu, 12 Nov 2015 22:01:56 +0000 (14:01 -0800)
committerChristopher Ferris <cferris@google.com>
Mon, 16 Nov 2015 22:17:08 +0000 (14:17 -0800)
commited24d2ae2cd6e8b0afb86efa555f18bcfaf74a64
treebfb0a943770f19293b356855ee6daa1a00ce5123
parent74ee857d166f0696fe94628bbce391641343c418
Fix a few bugs related to dumping files.

Fixes:

- Fix double print of header in dump_file.

- Fix a few possible file descriptor leaks.

- Add /d/ as another directory which should be skipped when printing out
  last mod time of a file.

- Fix possible crash if the path passed to _dump_file_from_fd is less than
  the length of one of the directory checks.

Change-Id: I450dfab76fd0ce4d4dca9ed39c82a980054f3cc3
cmds/dumpstate/dumpstate.h
cmds/dumpstate/utils.cpp