uipc_shm.c (10b3b54548f2290bbe8d8f88c59c28d12b7a635d) uipc_shm.c (510ea843baf66ae678ca6ddbbbca9816177be5b0)
1/*-
2 * Copyright (c) 2006 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 205 unchanged lines hidden (view full) ---

214 * Attempt to return sanish values for fstat() on a memory file
215 * descriptor.
216 */
217 bzero(sb, sizeof(*sb));
218 sb->st_mode = S_IFREG | shmfd->shm_mode; /* XXX */
219 sb->st_blksize = PAGE_SIZE;
220 sb->st_size = shmfd->shm_size;
221 sb->st_blocks = (sb->st_size + sb->st_blksize - 1) / sb->st_blksize;
1/*-
2 * Copyright (c) 2006 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 205 unchanged lines hidden (view full) ---

214 * Attempt to return sanish values for fstat() on a memory file
215 * descriptor.
216 */
217 bzero(sb, sizeof(*sb));
218 sb->st_mode = S_IFREG | shmfd->shm_mode; /* XXX */
219 sb->st_blksize = PAGE_SIZE;
220 sb->st_size = shmfd->shm_size;
221 sb->st_blocks = (sb->st_size + sb->st_blksize - 1) / sb->st_blksize;
222 sb->st_atimespec = shmfd->shm_atime;
223 sb->st_ctimespec = shmfd->shm_ctime;
224 sb->st_mtimespec = shmfd->shm_mtime;
225 sb->st_birthtimespec = shmfd->shm_birthtime;
222 sb->st_atim = shmfd->shm_atime;
223 sb->st_ctim = shmfd->shm_ctime;
224 sb->st_mtim = shmfd->shm_mtime;
225 sb->st_birthtim = shmfd->shm_birthtime;
226 sb->st_uid = shmfd->shm_uid;
227 sb->st_gid = shmfd->shm_gid;
228
229 return (0);
230}
231
232static int
233shm_close(struct file *fp, struct thread *td)

--- 411 unchanged lines hidden ---
226 sb->st_uid = shmfd->shm_uid;
227 sb->st_gid = shmfd->shm_gid;
228
229 return (0);
230}
231
232static int
233shm_close(struct file *fp, struct thread *td)

--- 411 unchanged lines hidden ---