Fix migrating to snprintf_blkptr

This commit is contained in:
ozaki-r 2014-03-28 03:18:24 +00:00
parent 2821606826
commit c5002aae34
2 changed files with 3 additions and 3 deletions

View File

@ -1427,7 +1427,7 @@ dump_dir(objset_t *os)
len = snprintf(blkbuf, blklen, ", rootbp ");
if (len > blklen)
len = blklen;
printf_blkptr(blkbuf + len, blklen - len, os->os_rootbp);
snprintf_blkptr(blkbuf + len, blklen - len, os->os_rootbp);
} else {
blkbuf[0] = '\0';
}

View File

@ -592,7 +592,7 @@ extern char *spa_strdup(const char *);
extern void spa_strfree(char *);
extern uint64_t spa_get_random(uint64_t range);
extern uint64_t spa_generate_guid(spa_t *spa);
extern void sprintf_blkptr(char *buf, const blkptr_t *bp);
extern void snprintf_blkptr(char *buf, const blkptr_t *bp);
extern void spa_freeze(spa_t *spa);
extern void spa_upgrade(spa_t *spa, uint64_t version);
extern void spa_evict_all(void);
@ -672,7 +672,7 @@ extern void spa_event_notify(spa_t *spa, vdev_t *vdev, const char *name);
#define dprintf_bp(bp, fmt, ...) do { \
if (zfs_flags & ZFS_DEBUG_DPRINTF) { \
char *__blkbuf = kmem_alloc(BP_SPRINTF_LEN, KM_SLEEP); \
sprintf_blkptr(__blkbuf, (bp)); \
snprintf_blkptr(__blkbuf, BP_SPRINTF_LEN, (bp)); \
dprintf(fmt " %s\n", __VA_ARGS__, __blkbuf); \
kmem_free(__blkbuf, BP_SPRINTF_LEN); \
} \