* the reader.
*/
-#include <linux/config.h>
#include <linux/module.h> /* for EXPORT_SYMBOL */
#include <linux/string.h>
#include <linux/types.h>
#include "common.h" /* atm_proc_init prototype */
#include "signaling.h" /* to get sigd - ugly too */
-static ssize_t proc_dev_atm_read(struct file *file,char *buf,size_t count,
+static ssize_t proc_dev_atm_read(struct file *file,char __user *buf,size_t count,
loff_t *pos);
static struct file_operations proc_atm_dev_ops = {
static inline int compare_family(struct sock *sk, int family)
{
- struct atm_vcc *vcc = atm_sk(sk);
-
- return !family || (vcc->sk->sk_family == family);
+ return !family || (sk->sk_family == family);
}
static int __vcc_walk(struct sock **sock, int family, int *bucket, loff_t l)
static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc)
{
+ struct sock *sk = sk_atm(vcc);
+
seq_printf(seq, "%p ", vcc);
if (!vcc->dev)
seq_printf(seq, "Unassigned ");
else
seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi,
vcc->vci);
- switch (vcc->sk->sk_family) {
+ switch (sk->sk_family) {
case AF_ATMPVC:
seq_printf(seq, "PVC");
break;
seq_printf(seq, "SVC");
break;
default:
- seq_printf(seq, "%3d", vcc->sk->sk_family);
+ seq_printf(seq, "%3d", sk->sk_family);
}
- seq_printf(seq, " %04lx %5d %7d/%7d %7d/%7d [%d]\n", vcc->flags, vcc->sk->sk_err,
- atomic_read(&vcc->sk->sk_wmem_alloc),vcc->sk->sk_sndbuf,
- atomic_read(&vcc->sk->sk_rmem_alloc),vcc->sk->sk_rcvbuf,
- atomic_read(&vcc->sk->sk_refcnt));
+ seq_printf(seq, " %04lx %5d %7d/%7d %7d/%7d [%d]\n", vcc->flags, sk->sk_err,
+ atomic_read(&sk->sk_wmem_alloc), sk->sk_sndbuf,
+ atomic_read(&sk->sk_rmem_alloc), sk->sk_rcvbuf,
+ atomic_read(&sk->sk_refcnt));
}
static void svc_info(struct seq_file *seq, struct atm_vcc *vcc)
.release = vcc_seq_release,
};
-static ssize_t proc_dev_atm_read(struct file *file,char *buf,size_t count,
- loff_t *pos)
+static ssize_t proc_dev_atm_read(struct file *file, char __user *buf,
+ size_t count, loff_t *pos)
{
struct atm_dev *dev;
unsigned long page;
if (count == 0) return 0;
page = get_zeroed_page(GFP_KERNEL);
if (!page) return -ENOMEM;
- dev = PDE(file->f_dentry->d_inode)->data;
+ dev = PDE(file->f_path.dentry->d_inode)->data;
if (!dev->ops->proc_read)
length = -EINVAL;
else {
goto out;
}
-void __exit atm_proc_exit(void)
+void atm_proc_exit(void)
{
atm_proc_dirs_remove();
}