file.c (14126) | file.c (21786) |
---|---|
1/* 2 * Copyright (c) 1995 3 * A.R. Gordon (andrew.gordon@net-tel.co.uk). 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 --- 144 unchanged lines hidden (view full) --- 153 exit(1); 154 } 155 156 /* File now open. mmap() it, with a generous size to allow for */ 157 /* later growth, where we will extend the file but not re-map it. */ 158 status_info = (FileLayout *) 159 mmap(NULL, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED, status_fd, 0); 160 | 1/* 2 * Copyright (c) 1995 3 * A.R. Gordon (andrew.gordon@net-tel.co.uk). 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 --- 144 unchanged lines hidden (view full) --- 153 exit(1); 154 } 155 156 /* File now open. mmap() it, with a generous size to allow for */ 157 /* later growth, where we will extend the file but not re-map it. */ 158 status_info = (FileLayout *) 159 mmap(NULL, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED, status_fd, 0); 160 |
161 if (status_info == (FileLayout *) -1) | 161 if (status_info == (FileLayout *) MAP_FAILED) |
162 { 163 perror("rpc.statd"); 164 fprintf(stderr, "Unable to mmap() status file\n"); 165 } 166 167 status_file_len = lseek(status_fd, 0L, SEEK_END); 168 169 /* If the file was not newly created, validate the contents, and if */ --- 187 unchanged lines hidden --- | 162 { 163 perror("rpc.statd"); 164 fprintf(stderr, "Unable to mmap() status file\n"); 165 } 166 167 status_file_len = lseek(status_fd, 0L, SEEK_END); 168 169 /* If the file was not newly created, validate the contents, and if */ --- 187 unchanged lines hidden --- |