Revision 1a9353d2 linux-user/syscall.c

b/linux-user/syscall.c
66 66
        char            d_name[256]; /* We must not include limits.h! */
67 67
};
68 68

  
69
//#include <linux/msdos_fs.h>
70
#define	VFAT_IOCTL_READDIR_BOTH		_IOR('r', 1, struct dirent [2])
71
#define	VFAT_IOCTL_READDIR_SHORT	_IOR('r', 2, struct dirent [2])
72

  
69 73
#include "syscall_defs.h"
70 74

  
71 75
#ifdef TARGET_I386
......
324 328
        break;
325 329
    case SOCKOP_sendmsg:
326 330
    case SOCKOP_recvmsg:
331
        {
332
            int fd;
333
            struct target_msghdr *msgp;
334
            struct msghdr msg;
335
            int flags, count, i;
336
            struct iovec *vec;
337
            struct target_iovec *target_vec;
338

  
339
            msgp = (void *)vptr[1];
340
            msg.msg_name = (void *)tswapl(msgp->msg_name);
341
            msg.msg_namelen = tswapl(msgp->msg_namelen);
342
            msg.msg_control = (void *)tswapl(msgp->msg_control);
343
            msg.msg_controllen = tswapl(msgp->msg_controllen);
344
            msg.msg_flags = tswap32(msgp->msg_flags);
345

  
346
            count = tswapl(msgp->msg_iovlen);
347
            vec = alloca(count * sizeof(struct iovec));
348
            target_vec = (void *)tswapl(msgp->msg_iov);
349
            for(i = 0;i < count; i++) {
350
                vec[i].iov_base = (void *)tswapl(target_vec[i].iov_base);
351
                vec[i].iov_len = tswapl(target_vec[i].iov_len);
352
            }
353
            msg.msg_iovlen = count;
354
            msg.msg_iov = vec;
355

  
356
            fd = vptr[0];
357
            flags = vptr[2];
358
            if (num == SOCKOP_sendmsg)
359
                ret = sendmsg(fd, &msg, flags);
360
            else
361
                ret = recvmsg(fd, &msg, flags);
362
            ret = get_errno(ret);
363
        }
364
        break;
327 365
    case SOCKOP_setsockopt:
328 366
    case SOCKOP_getsockopt:
329 367
    default:
......
356 394
    int host_cmd;
357 395
    const char *name;
358 396
    int access;
359
    const argtype arg_type[3];
397
    const argtype arg_type[5];
360 398
} IOCTLEntry;
361 399

  
362 400
#define IOC_R 0x0001
......
962 1000
        ret = get_errno(setsid());
963 1001
        break;
964 1002
    case TARGET_NR_sigaction:
965
#if 0
1003
#if 1
966 1004
        {
967 1005
            int signum = arg1;
968 1006
            struct target_old_sigaction *tact = arg2, *toldact = arg3;
969
            ret = get_errno(setsid());
970
            
1007
            ret = 0;
971 1008

  
972 1009
        }
973 1010
        break;

Also available in: Unified diff