Remove support for obsolete 3.2.1 ABI

Change-Id: I76b4960bda41f55d9c42f8c99c5beae3424ca851
This commit is contained in:
David van Moolenbroek
2013-08-31 23:11:34 +02:00
committed by Lionel Sambuc
parent dc1c50abf2
commit 24ed4e38de
14 changed files with 21 additions and 358 deletions

View File

@@ -16,7 +16,6 @@
#include <string.h>
#include <minix/com.h>
#include <minix/callnr.h>
#include <minix/config.h> /* Remove with version check in do_truncate */
#include <minix/vfsif.h>
#include <dirent.h>
#include <assert.h>
@@ -307,13 +306,8 @@ int do_truncate(message *UNUSED(m_out))
resolve.l_vmnt_lock = VMNT_READ;
resolve.l_vnode_lock = VNODE_WRITE;
if (job_call_nr == TRUNCATE_321) {
length = (off_t) job_m_in.m2_l1;
if ((int) job_m_in.flength < 0) return(EINVAL);
} else {
length = (off_t) make64(job_m_in.m2_l1, job_m_in.m2_l2);
if (length < 0) return(EINVAL);
}
length = (off_t) make64(job_m_in.m2_l1, job_m_in.m2_l2);
if (length < 0) return(EINVAL);
/* Temporarily open file */
if (fetch_name(vname, vname_length, fullpath) != OK) return(err_code);
@@ -350,14 +344,8 @@ int do_ftruncate(message *UNUSED(m_out))
scratch(fp).file.fd_nr = job_m_in.fd;
if (job_call_nr == FTRUNCATE_321) {
length = (off_t) job_m_in.m2_l1;
if ((int) job_m_in.flength < 0) return(EINVAL);
} else {
length = (off_t) make64(job_m_in.m2_l1, job_m_in.m2_l2);
if (length < 0) return(EINVAL);
}
length = (off_t) make64(job_m_in.m2_l1, job_m_in.m2_l2);
if (length < 0) return(EINVAL);
/* File is already opened; get a vnode pointer from filp */
if ((rfilp = get_filp(scratch(fp).file.fd_nr, VNODE_WRITE)) == NULL)

View File

@@ -6,7 +6,6 @@
*/
#include "fs.h"
#include <minix/callnr.h>
#include <minix/com.h>
#include <minix/u64.h>
#include <fcntl.h>
@@ -31,26 +30,11 @@ int req; /* either F_SETLK or F_SETLKW */
mode_t mo;
off_t first, last;
struct flock flock;
struct flock_321 fa_321;
struct file_lock *flp, *flp2, *empty;
/* Fetch the flock structure from user space. */
if (job_call_nr == FCNTL_321) {
r = sys_datacopy(who_e, (vir_bytes) scratch(fp).io.io_buffer,
VFS_PROC_NR, (vir_bytes) &fa_321, sizeof(fa_321));
/* Convert old values to new structure */
if (r == OK) {
flock.l_type = fa_321.l_type;
flock.l_whence = fa_321.l_whence;
flock.l_start = (off_t) fa_321.l_start;
flock.l_len = (off_t) fa_321.l_len;
flock.l_pid = fa_321.l_pid;
}
} else {
r = sys_datacopy(who_e, (vir_bytes) scratch(fp).io.io_buffer,
VFS_PROC_NR, (vir_bytes) &flock, sizeof(flock));
}
r = sys_datacopy(who_e, (vir_bytes) scratch(fp).io.io_buffer, VFS_PROC_NR,
(vir_bytes) &flock, sizeof(flock));
if (r != OK) return(EINVAL);
/* Make some error checks. */
@@ -159,23 +143,8 @@ int req; /* either F_SETLK or F_SETLKW */
}
/* Copy the flock structure back to the caller. */
if (job_call_nr == FCNTL_321) {
/* Convert new values to old structure */
if (r == OK) {
fa_321.l_type = flock.l_type;
fa_321.l_whence = flock.l_whence;
fa_321.l_start = (i32_t) flock.l_start;
fa_321.l_len = (i32_t) flock.l_len;
fa_321.l_pid = flock.l_pid;
}
r = sys_datacopy(VFS_PROC_NR, (vir_bytes) &fa_321,
who_e, (vir_bytes) scratch(fp).io.io_buffer,
sizeof(fa_321));
} else {
r = sys_datacopy(VFS_PROC_NR, (vir_bytes) &flock,
who_e, (vir_bytes) scratch(fp).io.io_buffer,
sizeof(flock));
}
r = sys_datacopy(VFS_PROC_NR, (vir_bytes) &flock, who_e,
(vir_bytes) scratch(fp).io.io_buffer, sizeof(flock));
return(r);
}

View File

@@ -180,24 +180,8 @@ int do_fcntl(message *UNUSED(m_out))
else if (!(f->filp_mode & W_BIT)) r = EBADF;
else {
/* Copy flock data from userspace. */
if (job_call_nr == FCNTL_321) {
struct flock_321 fa_321;
r = sys_datacopy(who_e,
(vir_bytes) scratch(fp).io.io_buffer, SELF,
(vir_bytes) &fa_321, sizeof(fa_321));
/* Let's convert the values to the new structure */
if (r == OK) {
flock_arg.l_type = fa_321.l_type;
flock_arg.l_whence = fa_321.l_whence;
flock_arg.l_start = (off_t) fa_321.l_start;
flock_arg.l_len = (off_t) fa_321.l_len;
flock_arg.l_pid = fa_321.l_pid;
}
} else {
r = sys_datacopy(who_e,
(vir_bytes) scratch(fp).io.io_buffer, SELF,
(vir_bytes) &flock_arg, sizeof(flock_arg));
}
r = sys_datacopy(who_e, (vir_bytes) scratch(fp).io.io_buffer,
SELF, (vir_bytes) &flock_arg, sizeof(flock_arg));
}
if (r != OK) break;

View File

@@ -7,7 +7,6 @@
* do_mkdir: perform the MKDIR system call
* do_close: perform the CLOSE system call
* do_lseek: perform the LSEEK system call
* do_llseek: perform the LLSEEK system call
*/
#include "fs.h"
@@ -645,24 +644,6 @@ int actual_llseek(struct fproc *rfp, message *m_out, int seekfd, int seekwhence,
return(r);
}
/*===========================================================================*
* do_lseek_321 *
*===========================================================================*/
int do_lseek_321(message *m_out)
{
int r;
r = actual_llseek(fp, m_out, job_m_in.ls_fd, job_m_in.whence,
make64(job_m_in.offset_lo, 0));
/* check value is 32bit */
if (m_out->reply_l2 != 0) {
r = EOVERFLOW;
}
return r;
}
/*===========================================================================*
* do_lseek *
*===========================================================================*/
@@ -672,15 +653,6 @@ int do_lseek(message *m_out)
make64(job_m_in.offset_lo, job_m_in.offset_high));
}
/*===========================================================================*
* do_llseek *
*===========================================================================*/
int do_llseek(message *m_out)
{
return actual_llseek(fp, m_out, job_m_in.ls_fd, job_m_in.whence,
make64(job_m_in.offset_lo, job_m_in.offset_high));
}
/*===========================================================================*
* do_close *
*===========================================================================*/

View File

@@ -168,13 +168,10 @@ void close_reply(void);
int common_open(char path[PATH_MAX], int oflags, mode_t omode);
int do_creat(void);
int do_lseek(message *m_out);
int do_lseek_321(message *m_out);
int do_llseek(message *m_out);
int do_mknod(message *m_out);
int do_mkdir(message *m_out);
int do_open(message *m_out);
int do_slink(message *m_out);
int actual_lseek(message *m_out, int seekfd, int seekwhence, off_t offset);
int actual_llseek(struct fproc *rfp, message *m_out, int seekfd,
int seekwhence, off_t offset);
int do_vm_open(void);

View File

@@ -34,7 +34,7 @@ int (*call_vec[])(message *m_out) = {
do_chown, /* 16 = chown */
no_sys, /* 17 = break */
no_sys, /* 18 = unused (was old stat)*/
no_sys, /* 19 = unused (was lseek_321)*/
no_sys, /* 19 = unused */
no_sys, /* 20 = getpid */
do_mount, /* 21 = mount */
do_umount, /* 22 = umount */
@@ -95,7 +95,7 @@ int (*call_vec[])(message *m_out) = {
do_svrctl, /* 77 = svrctl */
no_sys, /* 78 = (sysuname) */
no_sys, /* 79 = unused */
do_getdents, /* 80 = getdents_321 (to be phased out) */
no_sys, /* 80 = unused */
do_lseek, /* 81 = llseek */
do_getvfsstat, /* 82 = getvfsstat */
do_statvfs, /* 83 = fstatvfs */
@@ -108,8 +108,8 @@ int (*call_vec[])(message *m_out) = {
no_sys, /* 90 = (gettimeofday) */
no_sys, /* 91 = (seteuid) */
no_sys, /* 92 = (setegid) */
do_truncate, /* 93 = truncate_321 (to be phased out) */
do_ftruncate, /* 94 = ftruncate_321 (to be phased out) */
no_sys, /* 93 = unused */
no_sys, /* 94 = unused */
do_chmod, /* 95 = fchmod */
do_chown, /* 96 = fchown */
do_lseek, /* 97 = lseek */