Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 217151 2011-01-08 16:13:44Z kib $");
---
> __FBSDID("$FreeBSD: head/sys/compat/freebsd32/freebsd32_misc.c 220158 2011-03-30 14:46:12Z kib $");
45a46
> #include <sys/linker.h>
2671a2673,2698
> int
> freebsd32_kldstat(struct thread *td, struct freebsd32_kldstat_args *uap)
> {
> struct kld_file_stat stat;
> struct kld32_file_stat stat32;
> int error, version;
>
> if ((error = copyin(&uap->stat->version, &version, sizeof(version)))
> != 0)
> return (error);
> if (version != sizeof(struct kld32_file_stat_1) &&
> version != sizeof(struct kld32_file_stat))
> return (EINVAL);
>
> error = kern_kldstat(td, uap->fileid, &stat);
> if (error != 0)
> return (error);
>
> bcopy(&stat.name[0], &stat32.name[0], sizeof(stat.name));
> CP(stat, stat32, refs);
> CP(stat, stat32, id);
> PTROUT_CP(stat, stat32, address);
> CP(stat, stat32, size);
> bcopy(&stat.pathname[0], &stat32.pathname[0], sizeof(stat.pathname));
> return (copyout(&stat32, uap->stat, version));
> }