primary.c (212046) | primary.c (212899) |
---|---|
1/*- 2 * Copyright (c) 2009 The FreeBSD Foundation 3 * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009 The FreeBSD Foundation 3 * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 212046 2010-08-31 06:22:03Z pjd $"); | 32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 212899 2010-09-20 13:23:43Z pjd $"); |
33 34#include <sys/types.h> 35#include <sys/time.h> 36#include <sys/bio.h> 37#include <sys/disk.h> 38#include <sys/refcount.h> 39#include <sys/stat.h> 40 --- 212 unchanged lines hidden (view full) --- 253 } 254 res->hr_ggateunit = -1; 255 } 256 257 /* Restore errno. */ 258 errno = rerrno; 259} 260 | 33 34#include <sys/types.h> 35#include <sys/time.h> 36#include <sys/bio.h> 37#include <sys/disk.h> 38#include <sys/refcount.h> 39#include <sys/stat.h> 40 --- 212 unchanged lines hidden (view full) --- 253 } 254 res->hr_ggateunit = -1; 255 } 256 257 /* Restore errno. */ 258 errno = rerrno; 259} 260 |
261static void | 261static __dead2 void |
262primary_exit(int exitcode, const char *fmt, ...) 263{ 264 va_list ap; 265 266 assert(exitcode != EX_OK); 267 va_start(ap, fmt); 268 pjdlogv_errno(LOG_ERR, fmt, ap); 269 va_end(ap); 270 cleanup(gres); 271 exit(exitcode); 272} 273 | 262primary_exit(int exitcode, const char *fmt, ...) 263{ 264 va_list ap; 265 266 assert(exitcode != EX_OK); 267 va_start(ap, fmt); 268 pjdlogv_errno(LOG_ERR, fmt, ap); 269 va_end(ap); 270 cleanup(gres); 271 exit(exitcode); 272} 273 |
274static void | 274static __dead2 void |
275primary_exitx(int exitcode, const char *fmt, ...) 276{ 277 va_list ap; 278 279 va_start(ap, fmt); 280 pjdlogv(exitcode == EX_OK ? LOG_INFO : LOG_ERR, fmt, ap); 281 va_end(ap); 282 cleanup(gres); --- 1708 unchanged lines hidden --- | 275primary_exitx(int exitcode, const char *fmt, ...) 276{ 277 va_list ap; 278 279 va_start(ap, fmt); 280 pjdlogv(exitcode == EX_OK ? LOG_INFO : LOG_ERR, fmt, ap); 281 va_end(ap); 282 cleanup(gres); --- 1708 unchanged lines hidden --- |