View | Details | Raw Unified | Return to bug 219715 | Differences between
and this patch

Collapse All | Expand All

(-)b/coregrind/m_syswrap/priv_syswrap-freebsd.h (+4 lines)
Lines 97-106 DECL_TEMPLATE(freebsd, sys_setegid); Link Here
97
DECL_TEMPLATE(freebsd, sys_seteuid);
97
DECL_TEMPLATE(freebsd, sys_seteuid);
98
DECL_TEMPLATE(freebsd, sys_stat);
98
DECL_TEMPLATE(freebsd, sys_stat);
99
DECL_TEMPLATE(freebsd, sys_fstat);
99
DECL_TEMPLATE(freebsd, sys_fstat);
100
DECL_TEMPLATE(freebsd, sys_fstat64);
100
DECL_TEMPLATE(freebsd, sys_lstat);
101
DECL_TEMPLATE(freebsd, sys_lstat);
101
DECL_TEMPLATE(freebsd, sys_pathconf);
102
DECL_TEMPLATE(freebsd, sys_pathconf);
102
DECL_TEMPLATE(freebsd, sys_fpathconf);
103
DECL_TEMPLATE(freebsd, sys_fpathconf);
103
DECL_TEMPLATE(freebsd, sys_getdirentries);
104
DECL_TEMPLATE(freebsd, sys_getdirentries);
105
DECL_TEMPLATE(freebsd, sys_getdirentries64);
104
DECL_TEMPLATE(freebsd, sys_mmap);
106
DECL_TEMPLATE(freebsd, sys_mmap);
105
DECL_TEMPLATE(freebsd, sys___syscall);
107
DECL_TEMPLATE(freebsd, sys___syscall);
106
DECL_TEMPLATE(freebsd, sys_lseek);
108
DECL_TEMPLATE(freebsd, sys_lseek);
Lines 208-213 DECL_TEMPLATE(freebsd, sys_kevent); Link Here
208
DECL_TEMPLATE(freebsd, sys_sendfile);
210
DECL_TEMPLATE(freebsd, sys_sendfile);
209
DECL_TEMPLATE(freebsd, sys_statfs6);
211
DECL_TEMPLATE(freebsd, sys_statfs6);
210
DECL_TEMPLATE(freebsd, sys_fstatfs6);
212
DECL_TEMPLATE(freebsd, sys_fstatfs6);
213
DECL_TEMPLATE(freebsd, sys_fstatfs64);
211
DECL_TEMPLATE(freebsd, sys_fhstatfs6);
214
DECL_TEMPLATE(freebsd, sys_fhstatfs6);
212
DECL_TEMPLATE(freebsd, sys_thr_exit);
215
DECL_TEMPLATE(freebsd, sys_thr_exit);
213
DECL_TEMPLATE(freebsd, sys_thr_self);
216
DECL_TEMPLATE(freebsd, sys_thr_self);
Lines 251-256 DECL_TEMPLATE(freebsd, sys_fchmodat); Link Here
251
DECL_TEMPLATE(freebsd, sys_fchownat);
254
DECL_TEMPLATE(freebsd, sys_fchownat);
252
DECL_TEMPLATE(freebsd, sys_fexecve);
255
DECL_TEMPLATE(freebsd, sys_fexecve);
253
DECL_TEMPLATE(freebsd, sys_fstatat);
256
DECL_TEMPLATE(freebsd, sys_fstatat);
257
DECL_TEMPLATE(freebsd, sys_fstatat64);
254
DECL_TEMPLATE(freebsd, sys_futimesat);
258
DECL_TEMPLATE(freebsd, sys_futimesat);
255
DECL_TEMPLATE(freebsd, sys_linkat);
259
DECL_TEMPLATE(freebsd, sys_linkat);
256
DECL_TEMPLATE(freebsd, sys_mkdirat);
260
DECL_TEMPLATE(freebsd, sys_mkdirat);
(-)b/coregrind/m_syswrap/syswrap-freebsd.c (+65 lines)
Lines 885-890 POST(sys_fstat) Link Here
885
   POST_MEM_WRITE( ARG2, sizeof(struct vki_stat) );
885
   POST_MEM_WRITE( ARG2, sizeof(struct vki_stat) );
886
}
886
}
887
887
888
PRE(sys_fstat64)
889
{
890
   PRINT("sys_fstat64 ( %ld, %#lx )", ARG1, ARG2);
891
   PRE_REG_READ2(long, "fstat", unsigned long, fd, struct stat *, buf);
892
   PRE_MEM_WRITE( "fstat(buf)", ARG2, sizeof(struct vki_stat64) );
893
}
894
895
POST(sys_fstat64)
896
{
897
   POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) );
898
}
899
888
PRE(sys_pathconf)
900
PRE(sys_pathconf)
889
{
901
{
890
   PRINT("sys_pathconf ( %#lx(%s), %ld )",ARG1,(char *)ARG1,ARG2);
902
   PRINT("sys_pathconf ( %#lx(%s), %ld )",ARG1,(char *)ARG1,ARG2);
Lines 1029-1034 POST(sys_getdirentries) Link Here
1029
   }
1041
   }
1030
}
1042
}
1031
1043
1044
PRE(sys_getdirentries64)
1045
{
1046
   *flags |= SfMayBlock;
1047
   PRINT("sys_getdents ( %ld, %#lx, %ld )", ARG1,ARG2,ARG3);
1048
   PRE_REG_READ3(vki_ssize_t, "getdirentries",
1049
                 unsigned int, fd, struct dirent *, dirp,
1050
                 vki_size_t, count);
1051
   PRE_MEM_WRITE( "getdirentries(dirp)", ARG2, ARG3 );
1052
}
1053
1054
POST(sys_getdirentries64)
1055
{
1056
   vg_assert(SUCCESS);
1057
   if (RES > 0) {
1058
      POST_MEM_WRITE( ARG2, RES );
1059
      if ( ARG4 != 0 )
1060
	 POST_MEM_WRITE( ARG4, sizeof (vki_off_t));
1061
   }
1062
}
1063
1032
PRE(sys_seteuid)
1064
PRE(sys_seteuid)
1033
{
1065
{
1034
   PRINT("sys_seteuid ( %ld )", ARG1);
1066
   PRINT("sys_seteuid ( %ld )", ARG1);
Lines 1251-1256 POST(sys_fstatfs6) Link Here
1251
   POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs6) );
1283
   POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs6) );
1252
}
1284
}
1253
1285
1286
PRE(sys_fstatfs64)
1287
{
1288
   PRINT("sys_fstatfs64 ( %ld, %#lx )", ARG1, ARG2);
1289
   PRE_REG_READ2(long, "fstatfs6",
1290
                 unsigned int, fd, struct statfs *, buf);
1291
   PRE_MEM_WRITE( "fstatfs6(buf)", ARG2, sizeof(struct vki_statfs64) );
1292
}
1293
1294
POST(sys_fstatfs64)
1295
{
1296
   POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs64) );
1297
}
1298
1254
PRE(sys_statfs6)
1299
PRE(sys_statfs6)
1255
{
1300
{
1256
   PRINT("sys_statfs6 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
1301
   PRINT("sys_statfs6 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
Lines 3132-3137 POST(sys_fstatat) Link Here
3132
   POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
3177
   POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
3133
}
3178
}
3134
3179
3180
PRE(sys_fstatat64)
3181
{
3182
   PRINT("sys_fstatat ( %ld, %#lx(%s), %#lx )", ARG1,ARG2,(char*)ARG2,ARG3);
3183
   PRE_REG_READ3(long, "fstatat",
3184
                 int, dfd, char *, file_name, struct stat *, buf);
3185
   PRE_MEM_RASCIIZ( "fstatat(file_name)", ARG2 );
3186
   PRE_MEM_WRITE( "fstatat(buf)", ARG3, sizeof(struct vki_stat) );
3187
}
3188
3189
POST(sys_fstatat64)
3190
{
3191
   POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
3192
}
3193
3135
PRE(sys_unlinkat)
3194
PRE(sys_unlinkat)
3136
{
3195
{
3137
   *flags |= SfMayBlock;
3196
   *flags |= SfMayBlock;
Lines 4427-4432 const SyscallTableEntry ML_(syscall_table)[] = { Link Here
4427
   BSDXY(__NR_accept4,           sys_accept4),            //541
4486
   BSDXY(__NR_accept4,           sys_accept4),            //541
4428
   BSDXY(__NR_pipe2,			sys_pipe2),			// 542
4487
   BSDXY(__NR_pipe2,			sys_pipe2),			// 542
4429
4488
4489
   // ino64
4490
   BSDXY(__NR_fstat64,			sys_fstat64),			// 551
4491
   BSDXY(__NR_fstatat64,		sys_fstatat64),			// 552
4492
   BSDXY(__NR_getdirentries64,		sys_getdirentries64),		// 554
4493
   GENXY(__NR_fstatfs64,		sys_fstatfs),   		// 556
4494
4430
   BSDX_(__NR_fake_sigreturn,		sys_fake_sigreturn),		// 1000, fake sigreturn
4495
   BSDX_(__NR_fake_sigreturn,		sys_fake_sigreturn),		// 1000, fake sigreturn
4431
4496
4432
};
4497
};
(-)b/include/vki/vki-freebsd.h (+56 lines)
Lines 367-372 struct vki_stat { Link Here
367
	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
367
	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
368
};
368
};
369
369
370
struct vki_stat64 {
371
	vki_uint64_t	st_dev;
372
	vki_uint64_t	st_ino;
373
	vki_uint64_t	st_nlink;
374
	vki_mode_t	st_mode;
375
        vki_int16_t     st_padding0;
376
	vki_uid_t	st_uid;
377
	vki_gid_t	st_gid;
378
        vki_int32_t     st_padding1;
379
	vki_uint64_t	st_rdev;
380
#if 0
381
	struct vki_timespec	st_atimespec;
382
	struct vki_timespec	st_mtimespec;
383
	struct vki_timespec	st_ctimespec;
384
#else
385
	vki_time_t	st_atime;
386
	long		st_atime_nsec;
387
	vki_time_t	st_mtime;
388
	long		st_mtime_nsec;
389
	vki_time_t	st_ctime;
390
	long		st_ctime_nsec;
391
#endif
392
	vki_off_t	st_size;
393
	vki_blkcnt_t	st_blocks;
394
	vki_blksize_t	st_blksize;
395
	vki_fflags_t	st_flags;
396
	vki_uint64_t	st_gen;
397
	vki_int64_t	st_spare[10];
398
//	struct vki_timespec	st_birthtimespec;
399
//	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
400
//	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
401
};
370
402
371
//----------------------------------------------------------------------
403
//----------------------------------------------------------------------
372
// From linux-2.6.8.1/include/linux/sched.h
404
// From linux-2.6.8.1/include/linux/sched.h
Lines 941-946 struct vki_statfs { Link Here
941
	char		f_mntonname[VKI_MNAMELEN];
973
	char		f_mntonname[VKI_MNAMELEN];
942
};
974
};
943
975
976
struct vki_statfs64 {
977
	vki_uint32_t	f_version;
978
	vki_uint32_t	f_type;
979
	vki_uint64_t	f_flags;
980
	vki_uint64_t	f_bsize;
981
	vki_uint64_t	f_iosize;
982
	vki_uint64_t	f_blocks;
983
	vki_uint64_t	f_bfree;
984
	vki_int64_t	f_bavail;
985
	vki_uint64_t	f_files;
986
	vki_int64_t	f_ffree;
987
	vki_uint64_t	f_syncwrites;
988
	vki_uint64_t	f_asyncwrites;
989
	vki_uint64_t	f_syncreads;
990
	vki_uint64_t	f_asyncreads;
991
	vki_uint64_t	f_spare[10];
992
	vki_uint32_t	f_namemax;
993
	vki_uid_t	f_owner;
994
	vki_fsid_t	f_fsid;
995
	char		f_charspare[80];
996
	char		f_fstypename[VKI_MFSNAMELEN];
997
	char		f_mntfromnname[VKI_MNAMELEN];
998
	char		f_mntonname[VKI_MNAMELEN];
999
};
944
#define MAXFIDSZ        16
1000
#define MAXFIDSZ        16
945
1001
946
struct vki_fid {
1002
struct vki_fid {
(-)b/include/vki/vki-scnums-freebsd.h (-1 / +4 lines)
Lines 412-417 Link Here
412
#define	__NR_shmctl		512
412
#define	__NR_shmctl		512
413
#define __NR_accept4		541
413
#define __NR_accept4		541
414
#define	__NR_pipe2		542
414
#define	__NR_pipe2		542
415
#define	__NR_fstat64		551
416
#define	__NR_fstatat64		552
417
#define	__NR_getdirentries64	554
418
#define	__NR_fstatfs64		556
415
419
416
#define __NR_fake_sigreturn	1000
420
#define __NR_fake_sigreturn	1000
417
421
418
- 

Return to bug 219715