scheme.c (263461) | scheme.c (263466) |
---|---|
1/*- 2 * Copyright (c) 2013,2014 Juniper Networks, Inc. 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 --- 19 unchanged lines hidden (view full) --- 28__FBSDID("$FreeBSD$"); 29 30#include <sys/types.h> 31#include <sys/linker_set.h> 32#include <sys/queue.h> 33#include <err.h> 34#include <errno.h> 35#include <stdint.h> | 1/*- 2 * Copyright (c) 2013,2014 Juniper Networks, Inc. 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 --- 19 unchanged lines hidden (view full) --- 28__FBSDID("$FreeBSD$"); 29 30#include <sys/types.h> 31#include <sys/linker_set.h> 32#include <sys/queue.h> 33#include <err.h> 34#include <errno.h> 35#include <stdint.h> |
36#include <strings.h> | 36#include |
37#include <unistd.h> 38 39#include "mkimg.h" 40#include "scheme.h" 41 42static struct mkimg_scheme *scheme; 43static u_int secsz = 512; 44 --- 36 unchanged lines hidden (view full) --- 81 alias = iter; 82 break; 83 } 84 iter++; 85 } 86 if (alias == NULL) 87 return (EINVAL); 88 p->type = iter->type; | 37#include <unistd.h> 38 39#include "mkimg.h" 40#include "scheme.h" 41 42static struct mkimg_scheme *scheme; 43static u_int secsz = 512; 44 --- 36 unchanged lines hidden (view full) --- 81 alias = iter; 82 break; 83 } 84 iter++; 85 } 86 if (alias == NULL) 87 return (EINVAL); 88 p->type = iter->type; |
89 90 /* Validate the optional label. */ 91 if (p->label != NULL) { 92 if (strlen(p->label) > scheme->labellen) 93 return (EOPNOTSUPP); 94 } 95 |
|
89 return (0); 90} 91 92u_int 93scheme_max_parts(void) 94{ 95 96 return (scheme->nparts); --- 49 unchanged lines hidden --- | 96 return (0); 97} 98 99u_int 100scheme_max_parts(void) 101{ 102 103 return (scheme->nparts); --- 49 unchanged lines hidden --- |