recvjob.c (167260) | recvjob.c (182599) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 31 unchanged lines hidden (view full) --- 40 41#if 0 42#ifndef lint 43static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95"; 44#endif /* not lint */ 45#endif 46 47#include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 31 unchanged lines hidden (view full) --- 40 41#if 0 42#ifndef lint 43static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95"; 44#endif /* not lint */ 45#endif 46 47#include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ |
48__FBSDID("$FreeBSD: head/usr.sbin/lpr/lpd/recvjob.c 167260 2007-03-06 09:32:41Z kevlo $"); | 48__FBSDID("$FreeBSD: head/usr.sbin/lpr/lpd/recvjob.c 182599 2008-09-01 12:32:40Z ticso $"); |
49 50/* 51 * Receive printer jobs from the network, queue them and 52 * start the printer daemon. 53 */ 54#include <sys/param.h> 55#include <sys/mount.h> 56#include <sys/stat.h> --- 267 unchanged lines hidden (view full) --- 324 325/* 326 * Check to see if there is enough space on the disk for size bytes. 327 * 1 == OK, 0 == Not OK. 328 */ 329static int 330chksize(int size) 331{ | 49 50/* 51 * Receive printer jobs from the network, queue them and 52 * start the printer daemon. 53 */ 54#include <sys/param.h> 55#include <sys/mount.h> 56#include <sys/stat.h> --- 267 unchanged lines hidden (view full) --- 324 325/* 326 * Check to see if there is enough space on the disk for size bytes. 327 * 1 == OK, 0 == Not OK. 328 */ 329static int 330chksize(int size) 331{ |
332 int spacefree; | 332 int64_t spacefree; |
333 struct statfs sfb; 334 335 if (statfs(".", &sfb) < 0) { 336 syslog(LOG_ERR, "%s: %m", "statfs(\".\")"); 337 return (1); 338 } 339 spacefree = sfb.f_bavail * (sfb.f_bsize / 512); 340 size = (size + 511) / 512; --- 69 unchanged lines hidden --- | 333 struct statfs sfb; 334 335 if (statfs(".", &sfb) < 0) { 336 syslog(LOG_ERR, "%s: %m", "statfs(\".\")"); 337 return (1); 338 } 339 spacefree = sfb.f_bavail * (sfb.f_bsize / 512); 340 size = (size + 511) / 512; --- 69 unchanged lines hidden --- |