growfs (4a30d7bb373c08f42f953b9cd1e793e236b4cd92) growfs (4c8a257810a69264015e4912e02f8c2c837c792e)
1#!/bin/sh
2#
3# Copyright 2022 Michael J. Karels
4# Copyright 2014 John-Mark Gurney
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 186 unchanged lines hidden (view full) ---

195 offset[lvl] = $9
196 parttype[lvl] = $13
197 size[lvl] = $4
198 if (verbose) print lvl, type[lvl], $3
199 if (type[lvl] == "DISK") {
200 disksize = size[lvl]
201 if (verbose)
202 print "disksize ", disksize
1#!/bin/sh
2#
3# Copyright 2022 Michael J. Karels
4# Copyright 2014 John-Mark Gurney
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 186 unchanged lines hidden (view full) ---

195 offset[lvl] = $9
196 parttype[lvl] = $13
197 size[lvl] = $4
198 if (verbose) print lvl, type[lvl], $3
199 if (type[lvl] == "DISK") {
200 disksize = size[lvl]
201 if (verbose)
202 print "disksize ", disksize
203 # Don't add swap on disks under 15 GB (decimal) by default.
203 # Do not add swap on disks under 15 GB (decimal) by default.
204 if (addswap == 1 && (size[lvl] > 15000000000 || swapsize > 0))
205 doing_swap = 1
206 else
207 doing_swap = 0
208 } else if (type[lvl] == "PART" && $11 == "freebsd-swap" && \
209 int(swapsize) == 0) {
210 # This finds swap only if it precedes root, e.g. preceding disk.
211 addswap = 0

--- 99 unchanged lines hidden ---
204 if (addswap == 1 && (size[lvl] > 15000000000 || swapsize > 0))
205 doing_swap = 1
206 else
207 doing_swap = 0
208 } else if (type[lvl] == "PART" && $11 == "freebsd-swap" && \
209 int(swapsize) == 0) {
210 # This finds swap only if it precedes root, e.g. preceding disk.
211 addswap = 0

--- 99 unchanged lines hidden ---