]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fallocate: redo four tweaks that were accidentally undone
authorBenno Schulenberg <bensberg@telfort.nl>
Thu, 18 Sep 2025 08:57:05 +0000 (10:57 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 23 Sep 2025 12:07:09 +0000 (14:07 +0200)
Recent commit c407a13fc1 undid some changes that were made by
commits 762f295a02 and 325a269995.  Redo these changes.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
sys-utils/fallocate.c

index 30c391406e7b93768b50854879c47571d120f657..afd615537cecace7faad298397bc136c545b7ae2 100644 (file)
@@ -17,9 +17,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://gnu.org/licenses/>.
  */
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -396,16 +395,16 @@ int main(int argc, char **argv)
                if (length == -2LL)
                        length = 0;
                if (length < 0)
-                       errx(EXIT_FAILURE, _("invalid length value specified"));
+                       errx(EXIT_FAILURE, _("invalid length"));
        } else {
                /* it's safer to require the range specification (--length --offset) */
                if (length == -2LL)
                        errx(EXIT_FAILURE, _("no length argument specified"));
                if (length <= 0)
-                       errx(EXIT_FAILURE, _("invalid length value specified"));
+                       errx(EXIT_FAILURE, _("invalid length"));
        }
        if (offset < 0)
-               errx(EXIT_FAILURE, _("invalid offset value specified"));
+               errx(EXIT_FAILURE, _("invalid offset"));
 
        /* O_CREAT makes sense only for the default fallocate(2) behavior
         * when mode is no specified and new space is allocated */