linux-user: Support F_GETPIPE_SZ and F_SETPIPE_SZ fcntls
Support the F_GETPIPE_SZ and F_SETPIPE_SZ fcntl operations. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
		
							parent
							
								
									4debae6fa5
								
							
						
					
					
						commit
						7e3b92ece0
					
				| 
						 | 
					@ -918,6 +918,13 @@ print_fcntl(const struct syscallname *name,
 | 
				
			||||||
    case TARGET_F_GETLEASE:
 | 
					    case TARGET_F_GETLEASE:
 | 
				
			||||||
        gemu_log("F_GETLEASE");
 | 
					        gemu_log("F_GETLEASE");
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					    case TARGET_F_SETPIPE_SZ:
 | 
				
			||||||
 | 
					        gemu_log("F_SETPIPE_SZ,");
 | 
				
			||||||
 | 
					        print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					    case TARGET_F_GETPIPE_SZ:
 | 
				
			||||||
 | 
					        gemu_log("F_GETPIPE_SZ");
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
    case TARGET_F_DUPFD_CLOEXEC:
 | 
					    case TARGET_F_DUPFD_CLOEXEC:
 | 
				
			||||||
        gemu_log("F_DUPFD_CLOEXEC,");
 | 
					        gemu_log("F_DUPFD_CLOEXEC,");
 | 
				
			||||||
        print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
 | 
					        print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5585,6 +5585,10 @@ static int target_to_host_fcntl_cmd(int cmd)
 | 
				
			||||||
	case TARGET_F_SETOWN_EX:
 | 
						case TARGET_F_SETOWN_EX:
 | 
				
			||||||
	    return F_SETOWN_EX;
 | 
						    return F_SETOWN_EX;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					        case TARGET_F_SETPIPE_SZ:
 | 
				
			||||||
 | 
					            return F_SETPIPE_SZ;
 | 
				
			||||||
 | 
					        case TARGET_F_GETPIPE_SZ:
 | 
				
			||||||
 | 
					            return F_GETPIPE_SZ;
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
            return -TARGET_EINVAL;
 | 
					            return -TARGET_EINVAL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -5822,6 +5826,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
 | 
				
			||||||
    case TARGET_F_GETSIG:
 | 
					    case TARGET_F_GETSIG:
 | 
				
			||||||
    case TARGET_F_SETLEASE:
 | 
					    case TARGET_F_SETLEASE:
 | 
				
			||||||
    case TARGET_F_GETLEASE:
 | 
					    case TARGET_F_GETLEASE:
 | 
				
			||||||
 | 
					    case TARGET_F_SETPIPE_SZ:
 | 
				
			||||||
 | 
					    case TARGET_F_GETPIPE_SZ:
 | 
				
			||||||
        ret = get_errno(safe_fcntl(fd, host_cmd, arg));
 | 
					        ret = get_errno(safe_fcntl(fd, host_cmd, arg));
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2166,6 +2166,8 @@ struct target_statfs64 {
 | 
				
			||||||
#define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0)
 | 
					#define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0)
 | 
				
			||||||
#define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1)
 | 
					#define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1)
 | 
				
			||||||
#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
 | 
					#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
 | 
				
			||||||
 | 
					#define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7)
 | 
				
			||||||
 | 
					#define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8)
 | 
				
			||||||
#define TARGET_F_NOTIFY  (TARGET_F_LINUX_SPECIFIC_BASE+2)
 | 
					#define TARGET_F_NOTIFY  (TARGET_F_LINUX_SPECIFIC_BASE+2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(TARGET_ALPHA)
 | 
					#if defined(TARGET_ALPHA)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue