diff options
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 15 | ||||
-rw-r--r-- | include/linux/mISDNif.h | 31 |
2 files changed, 34 insertions, 12 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 37a2de18cfd0..98fa6c4a4bd6 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -645,6 +645,21 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
645 | } else | 645 | } else |
646 | err = -ENODEV; | 646 | err = -ENODEV; |
647 | break; | 647 | break; |
648 | case IMSETDEVNAME: | ||
649 | { | ||
650 | struct mISDN_devrename dn; | ||
651 | if (copy_from_user(&dn, (void __user *)arg, | ||
652 | sizeof(dn))) { | ||
653 | err = -EFAULT; | ||
654 | break; | ||
655 | } | ||
656 | dev = get_mdevice(dn.id); | ||
657 | if (dev) | ||
658 | strlcpy(dev->name, dn.name, MISDN_MAX_IDLEN); | ||
659 | else | ||
660 | err = -ENODEV; | ||
661 | } | ||
662 | break; | ||
648 | default: | 663 | default: |
649 | err = -EINVAL; | 664 | err = -EINVAL; |
650 | } | 665 | } |
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h index 74c903cd7a0a..be09476ed854 100644 --- a/include/linux/mISDNif.h +++ b/include/linux/mISDNif.h | |||
@@ -36,8 +36,8 @@ | |||
36 | * - should be incremented on every checkin | 36 | * - should be incremented on every checkin |
37 | */ | 37 | */ |
38 | #define MISDN_MAJOR_VERSION 1 | 38 | #define MISDN_MAJOR_VERSION 1 |
39 | #define MISDN_MINOR_VERSION 0 | 39 | #define MISDN_MINOR_VERSION 1 |
40 | #define MISDN_RELEASE 19 | 40 | #define MISDN_RELEASE 20 |
41 | 41 | ||
42 | /* primitives for information exchange | 42 | /* primitives for information exchange |
43 | * generell format | 43 | * generell format |
@@ -255,16 +255,6 @@ struct sockaddr_mISDN { | |||
255 | unsigned char tei; | 255 | unsigned char tei; |
256 | }; | 256 | }; |
257 | 257 | ||
258 | /* timer device ioctl */ | ||
259 | #define IMADDTIMER _IOR('I', 64, int) | ||
260 | #define IMDELTIMER _IOR('I', 65, int) | ||
261 | /* socket ioctls */ | ||
262 | #define IMGETVERSION _IOR('I', 66, int) | ||
263 | #define IMGETCOUNT _IOR('I', 67, int) | ||
264 | #define IMGETDEVINFO _IOR('I', 68, int) | ||
265 | #define IMCTRLREQ _IOR('I', 69, int) | ||
266 | #define IMCLEAR_L2 _IOR('I', 70, int) | ||
267 | |||
268 | struct mISDNversion { | 258 | struct mISDNversion { |
269 | unsigned char major; | 259 | unsigned char major; |
270 | unsigned char minor; | 260 | unsigned char minor; |
@@ -281,6 +271,23 @@ struct mISDN_devinfo { | |||
281 | char name[MISDN_MAX_IDLEN]; | 271 | char name[MISDN_MAX_IDLEN]; |
282 | }; | 272 | }; |
283 | 273 | ||
274 | struct mISDN_devrename { | ||
275 | u_int id; | ||
276 | char name[MISDN_MAX_IDLEN]; /* new name */ | ||
277 | }; | ||
278 | |||
279 | /* timer device ioctl */ | ||
280 | #define IMADDTIMER _IOR('I', 64, int) | ||
281 | #define IMDELTIMER _IOR('I', 65, int) | ||
282 | |||
283 | /* socket ioctls */ | ||
284 | #define IMGETVERSION _IOR('I', 66, int) | ||
285 | #define IMGETCOUNT _IOR('I', 67, int) | ||
286 | #define IMGETDEVINFO _IOR('I', 68, int) | ||
287 | #define IMCTRLREQ _IOR('I', 69, int) | ||
288 | #define IMCLEAR_L2 _IOR('I', 70, int) | ||
289 | #define IMSETDEVNAME _IOR('I', 71, struct mISDN_devrename) | ||
290 | |||
284 | static inline int | 291 | static inline int |
285 | test_channelmap(u_int nr, u_char *map) | 292 | test_channelmap(u_int nr, u_char *map) |
286 | { | 293 | { |