Submit #2778 » 0002-lib-libhammer-cleanups.patch
| lib/libhammer/misc.c | ||
|---|---|---|
|
if (mntsize <= 0)
|
||
|
return retval;
|
||
|
mntbufsize = (mntsize) * sizeof(struct statfs);
|
||
|
mntbufsize = mntsize * sizeof(struct statfs);
|
||
|
mntbuf = _libhammer_malloc(mntbufsize);
|
||
|
mntsize = getfsstat(mntbuf, (long)mntbufsize, MNT_NOWAIT);
|
||
| ... | ... | |
|
continue;
|
||
|
}
|
||
|
if ((ioctl(fd, HAMMERIOC_GET_INFO, &hi)) < 0) {
|
||
|
if (ioctl(fd, HAMMERIOC_GET_INFO, &hi) < 0) {
|
||
|
close(fd);
|
||
|
curmount--;
|
||
|
continue;
|
||
| sbin/hammer/cmd_snapshot.c | ||
|---|---|---|
|
#include <string.h>
|
||
|
#include <time.h>
|
||
|
extern char *find_pfs_mount(int pfsid, uuid_t parentuuid, int ismaster);
|
||
|
#define DEFAULT_SNAPSHOT_NAME "snap-%Y%m%d-%H%M"
|
||
|
static void snapshot_usage(int exit_code);
|
||