The following commit has been merged in the merge/master branch: commit 392159b48053701a6aaba5c1fad1f60a4481ae8c Merge: a4eded7ad2b1d5da0ca60af004a611a209988c75 f80413a252ab6f8c29bb761115cb75f9eb3089a5 Author: Marek Lindner lindner_marek@yahoo.de Date: Fri Jun 22 21:11:22 2012 +0200
Merge branch 'next'
diff --combined debugfs.c index ee8b322,34fbb16..391d4fb --- a/debugfs.c +++ b/debugfs.c @@@ -111,6 -111,11 +111,11 @@@ static int batadv_log_release(struct in return 0; }
+ static int batadv_log_empty(struct batadv_debug_log *debug_log) + { + return !(debug_log->log_start - debug_log->log_end); + } + static ssize_t batadv_log_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { @@@ -120,8 -125,7 +125,7 @@@ char *char_addr; char c;
- if ((file->f_flags & O_NONBLOCK) && - !(debug_log->log_end - debug_log->log_start)) + if ((file->f_flags & O_NONBLOCK) && batadv_log_empty(debug_log)) return -EAGAIN;
if (!buf) @@@ -134,7 -138,7 +138,7 @@@ return -EFAULT;
error = wait_event_interruptible(debug_log->queue_wait, - (debug_log->log_start - debug_log->log_end)); + (!batadv_log_empty(debug_log)));
if (error) return error; @@@ -175,7 -179,7 +179,7 @@@ static unsigned int batadv_log_poll(str
poll_wait(file, &debug_log->queue_wait, wait);
- if (debug_log->log_end - debug_log->log_start) + if (!batadv_log_empty(debug_log)) return POLLIN | POLLRDNORM;
return 0; @@@ -263,15 -267,6 +267,15 @@@ static int batadv_bla_claim_table_open( return single_open(file, batadv_bla_claim_table_seq_print_text, net_dev); } + +static int batadv_bla_backbone_table_open(struct inode *inode, + struct file *file) +{ + struct net_device *net_dev = (struct net_device *)inode->i_private; + return single_open(file, batadv_bla_backbone_table_seq_print_text, + net_dev); +} + #endif
static int batadv_transtable_local_open(struct inode *inode, struct file *file) @@@ -310,8 -305,6 +314,8 @@@ static BATADV_DEBUGINFO(transtable_glob batadv_transtable_global_open); #ifdef CONFIG_BATMAN_ADV_BLA static BATADV_DEBUGINFO(bla_claim_table, S_IRUGO, batadv_bla_claim_table_open); +static BATADV_DEBUGINFO(bla_backbone_table, S_IRUGO, + batadv_bla_backbone_table_open); #endif static BATADV_DEBUGINFO(transtable_local, S_IRUGO, batadv_transtable_local_open); @@@ -323,7 -316,6 +327,7 @@@ static struct batadv_debuginfo *batadv_ &batadv_debuginfo_transtable_global, #ifdef CONFIG_BATMAN_ADV_BLA &batadv_debuginfo_bla_claim_table, + &batadv_debuginfo_bla_backbone_table, #endif &batadv_debuginfo_transtable_local, &batadv_debuginfo_vis_data, @@@ -382,9 -374,9 +386,9 @@@ int batadv_debugfs_add_meshif(struct ne
for (bat_debug = batadv_mesh_debuginfos; *bat_debug; ++bat_debug) { file = debugfs_create_file(((*bat_debug)->attr).name, - S_IFREG | ((*bat_debug)->attr).mode, - bat_priv->debug_dir, - dev, &(*bat_debug)->fops); + S_IFREG | ((*bat_debug)->attr).mode, + bat_priv->debug_dir, + dev, &(*bat_debug)->fops); if (!file) { batadv_err(dev, "Can't add debugfs file: %s/%s\n", dev->name, ((*bat_debug)->attr).name);