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 --- 158 unchanged lines hidden (view full) --- 167u_int 168scheme_max_secsz(void) 169{ 170 171 return (scheme->maxsecsz); 172} 173 174lba_t |
175scheme_metadata(u_int where, lba_t start) |
176{ |
177 lba_t secs; |
178 |
179 secs = scheme->metadata(where); 180 return (round_block(start + secs)); |
181} 182 |
183int 184scheme_write(int fd, lba_t end) 185{ |
186 u_int cylsz; |
187 int error; 188 |
189 cylsz = nsecs * nheads; 190 ncyls = end + cylsz - 1 / cylsz; 191 |
192 if (ftruncate(fd, end * secsz) == -1) 193 return (errno); 194 195 error = scheme->write(fd, end, bootcode); 196 return (error); 197} |