+2001-10-26 Vladimir Makarov <vmakarov@redhat.com>
+
+ * gloss.h (gloss32::do_sys_unlink): New function.
+
+ * gloss.cxx (gloss32::syscall_trap): Add processing SYS_unlink.
+ (gloss32::do_sys_unlink): New function.
+ (gloss32::do_sys_exit): Add breaks after each case.
+ (gloss32::do_sys_lseek): Set up correct results.
+
2001-10-10 Frank Ch. Eigler <fche@redhat.com>
On advice of Keith Rautenbach <Keith.Rautenbach@insignia.com>:
case libgloss::SYS_times:
do_sys_times();
break;
+ case libgloss::SYS_unlink:
+ do_sys_unlink();
+ break;
default:
do_nonstandard_target_syscalls (syscall);
break;
}
void
+gloss32::do_sys_unlink()
+{
+ string filename;
+ int32 str_ptr;
+ int errcode;
+
+ get_int_argument(1, str_ptr);
+ get_string(str_ptr, filename, 100);
+
+ if (! this->remove (filename, errcode))
+ {
+ set_host_error_result (errcode);
+ set_int_result (-1);
+ }
+ else
+ set_int_result (0);
+}
+
+void
gloss32::do_sys_exit()
{
int32 value;
{
case 1:
whence = hostops::seek_cur;
+ break;
case 2:
whence = hostops::seek_end;
+ break;
default:
case 0:
whence = hostops::seek_set;
+ break;
}
size32 new_pos;
if (! this->lseek(handle, offset, whence, new_pos, errcode))
{
set_host_error_result(errcode);
- set_int_result(1);
+ set_int_result(-1);
return;
}
- set_int_result(0);
+ set_int_result(new_pos);
}
void
void do_sys_time();
void do_sys_gettimeofday();
void do_sys_times();
+ void do_sys_unlink();
virtual void do_nonstandard_target_syscalls(int32 syscall);
virtual bool target_to_host_open_flags (int open_flags, int& flags);
virtual int32 target_to_host_syscall (int32 syscall);