Lines 313-319
Link Here
|
313 |
swap_on_geli_args(const char *mntops) |
313 |
swap_on_geli_args(const char *mntops) |
314 |
{ |
314 |
{ |
315 |
const char *aalgo, *ealgo, *keylen_str, *sectorsize_str; |
315 |
const char *aalgo, *ealgo, *keylen_str, *sectorsize_str; |
316 |
const char *aflag, *eflag, *lflag, *sflag; |
316 |
const char *aflag, *eflag, *lflag, *Tflag, *sflag; |
317 |
char *p, *args, *token, *string, *ops; |
317 |
char *p, *args, *token, *string, *ops; |
318 |
int argsize, pagesize; |
318 |
int argsize, pagesize; |
319 |
size_t pagesize_len; |
319 |
size_t pagesize_len; |
Lines 321-327
Link Here
|
321 |
|
321 |
|
322 |
/* Use built-in defaults for geli(8). */ |
322 |
/* Use built-in defaults for geli(8). */ |
323 |
aalgo = ealgo = keylen_str = ""; |
323 |
aalgo = ealgo = keylen_str = ""; |
324 |
aflag = eflag = lflag = ""; |
324 |
aflag = eflag = lflag = Tflag = ""; |
325 |
|
325 |
|
326 |
/* We will always specify sectorsize. */ |
326 |
/* We will always specify sectorsize. */ |
327 |
sflag = " -s "; |
327 |
sflag = " -s "; |
Lines 365-370
Link Here
|
365 |
free(ops); |
365 |
free(ops); |
366 |
return (NULL); |
366 |
return (NULL); |
367 |
} |
367 |
} |
|
|
368 |
} else if ((p = strstr(token, "notrim")) == token) { |
369 |
Tflag = " -T "; |
368 |
} else if (strcmp(token, "sw") != 0) { |
370 |
} else if (strcmp(token, "sw") != 0) { |
369 |
warnx("Invalid option: %s", token); |
371 |
warnx("Invalid option: %s", token); |
370 |
free(ops); |
372 |
free(ops); |
Lines 387-394
Link Here
|
387 |
sectorsize_str = p; |
389 |
sectorsize_str = p; |
388 |
} |
390 |
} |
389 |
|
391 |
|
390 |
argsize = asprintf(&args, "%s%s%s%s%s%s%s%s -d", |
392 |
argsize = asprintf(&args, "%s%s%s%s%s%s%s%s%s -d", |
391 |
aflag, aalgo, eflag, ealgo, lflag, keylen_str, |
393 |
aflag, aalgo, eflag, ealgo, lflag, keylen_str, Tflag, |
392 |
sflag, sectorsize_str); |
394 |
sflag, sectorsize_str); |
393 |
|
395 |
|
394 |
free(ops); |
396 |
free(ops); |