From: Sascha Wildner Date: Fri, 16 Apr 2010 14:26:21 +0000 (+0200) Subject: Add more __printflike()'s and fix resulting fallout. X-Git-Tag: v2.7.1~1 X-Git-Url: https://gitweb.dragonflybsd.org/~hofmann/dragonfly.git/commitdiff_plain/fcefa6f26c5a95aefedc72d5f19ca5d039fb3855 Add more __printflike()'s and fix resulting fallout. --- diff --git a/sys/dsched/fq/dsched_fq_core.c b/sys/dsched/fq/dsched_fq_core.c index 76a2f53180..baf2e4eee0 100644 --- a/sys/dsched/fq/dsched_fq_core.c +++ b/sys/dsched/fq/dsched_fq_core.c @@ -535,7 +535,7 @@ fq_balance_thread(struct dsched_fq_dpriv *dpriv) if (total_budget > dpriv->max_budget) dpriv->max_budget = total_budget; - dsched_debug(4, "disk is %d\% busy\n", dpriv->disk_busy); + dsched_debug(4, "disk is %d%% busy\n", dpriv->disk_busy); TAILQ_FOREACH(fqp, &dpriv->fq_priv_list, dlink) { fqp->rebalance = 1; } diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index be467c26c6..eb4360ae24 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -853,10 +853,10 @@ diskioctl(struct dev_ioctl_args *ap) return (ENXIO); devfs_debug(DEVFS_DEBUG_DEBUG, - "diskioctl: cmd is: %x (name: %s)\n", + "diskioctl: cmd is: %lx (name: %s)\n", ap->a_cmd, dev->si_name); devfs_debug(DEVFS_DEBUG_DEBUG, - "diskioctl: &dp->d_slice is: %x, %x\n", + "diskioctl: &dp->d_slice is: %p, %p\n", &dp->d_slice, dp->d_slice); if (ap->a_cmd == DIOCGKERNELDUMP) { diff --git a/sys/sys/devfs.h b/sys/sys/devfs.h index 2814b6231e..63a5f00e6e 100644 --- a/sys/sys/devfs.h +++ b/sys/sys/devfs.h @@ -341,7 +341,7 @@ int devfs_clone_bitmap_chk(struct devfs_bitmap *, int); /* * Prototypes */ -int devfs_debug(int level, char *fmt, ...); +int devfs_debug(int level, char *fmt, ...) __printflike(2, 3); int devfs_allocv(struct vnode **, struct devfs_node *); struct devfs_node *devfs_allocp(devfs_nodetype, char *, struct devfs_node *, struct mount *, cdev_t); @@ -384,7 +384,7 @@ struct devfs_node *devfs_resolve_or_create_path( struct devfs_node *, char *, int); int devfs_resolve_name_path(char *, char *, char **, char **); struct devfs_node *devfs_create_device_node(struct devfs_node *, cdev_t, - char *, char *, ...); + char *, char *, ...) __printf0like(4, 5); int devfs_destroy_device_node(struct devfs_node *, cdev_t); int devfs_destroy_subnames(char *); @@ -393,7 +393,7 @@ struct devfs_node *devfs_find_device_node_by_name(struct devfs_node *, char *); cdev_t devfs_new_cdev(struct dev_ops *, int, struct dev_ops *); -cdev_t devfs_find_device_by_name(const char *, ...); +cdev_t devfs_find_device_by_name(const char *, ...) __printflike(1, 2); cdev_t devfs_find_device_by_udev(udev_t); struct vnode *devfs_inode_to_vnode(struct mount *, ino_t); diff --git a/sys/sys/device.h b/sys/sys/device.h index 5bdf6db5a9..485d527563 100644 --- a/sys/sys/device.h +++ b/sys/sys/device.h @@ -378,11 +378,12 @@ cdev_t make_dev_covering(struct dev_ops *ops, struct dev_ops *bops, int minor, cdev_t make_only_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid, int perms, const char *fmt, ...) __printflike(6, 7); cdev_t make_only_devfs_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid, - int perms, const char *fmt, ...) __printflike(6, 7); + int perms, const char *fmt, ...) __printflike(6, 7); void destroy_only_dev(cdev_t dev); -int make_dev_alias(cdev_t target, const char *fmt, ...); +int make_dev_alias(cdev_t target, const char *fmt, ...) __printflike(2, 3); cdev_t make_autoclone_dev(struct dev_ops *ops, struct devfs_bitmap *bitmap, - d_clone_t *nhandler, uid_t uid, gid_t gid, int perms, const char *fmt, ...); + d_clone_t *nhandler, uid_t uid, gid_t gid, int perms, + const char *fmt, ...) __printflike(7, 8); void destroy_autoclone_dev(cdev_t dev, struct devfs_bitmap *bitmap); void sync_devs(void); diff --git a/sys/sys/dsched.h b/sys/sys/dsched.h index 2446391e06..f61dd34de4 100644 --- a/sys/sys/dsched.h +++ b/sys/sys/dsched.h @@ -145,7 +145,7 @@ void dsched_cancel_bio(struct bio *bp); void dsched_strategy_raw(struct disk *dp, struct bio *bp); void dsched_strategy_sync(struct disk *dp, struct bio *bp); void dsched_strategy_async(struct disk *dp, struct bio *bp, biodone_t *done, void *priv); -int dsched_debug(int level, char *fmt, ...); +int dsched_debug(int level, char *fmt, ...) __printflike(2, 3); dsched_new_buf_t dsched_new_buf; dsched_new_proc_t dsched_new_proc; dsched_new_thread_t dsched_new_thread; diff --git a/sys/sys/thread.h b/sys/sys/thread.h index 474db4eba7..42c9f99546 100644 --- a/sys/sys/thread.h +++ b/sys/sys/thread.h @@ -327,7 +327,7 @@ extern void lwkt_init(void); extern struct thread *lwkt_alloc_thread(struct thread *, int, int, int); extern void lwkt_init_thread(struct thread *, void *, int, int, struct globaldata *); -extern void lwkt_set_comm(thread_t, const char *, ...); +extern void lwkt_set_comm(thread_t, const char *, ...) __printflike(2, 3); extern void lwkt_wait_free(struct thread *); extern void lwkt_free_thread(struct thread *); extern void lwkt_gdinit(struct globaldata *); @@ -399,7 +399,8 @@ extern void crit_panic(void); extern struct lwp *lwkt_preempted_proc(void); extern int lwkt_create (void (*func)(void *), void *, struct thread **, - struct thread *, int, int, const char *, ...); + struct thread *, int, int, + const char *, ...) __printflike(7, 8); extern void lwkt_exit (void) __dead2; extern void lwkt_remove_tdallq (struct thread *);