libbb: introduce and use is_prefixed_with()
[oweals/busybox.git] / util-linux / fdisk_sgi.c
index 785fc661b274f7ac773149478063280973864bce..23ebc56ef456e5a9c4c39ccaf4d5c3e6085adf34 100644 (file)
@@ -440,7 +440,7 @@ sgi_write_table(void)
                (unsigned int*)sgilabel, sizeof(*sgilabel)) == 0);
 
        write_sector(0, sgilabel);
-       if (!strncmp((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8)) {
+       if (is_prefixed_with((char*)sgilabel->directory[0].vol_file_name, "sgilabel")) {
                /*
                 * keep this habit of first writing the "sgilabel".
                 * I never tested whether it works without (AN 981002).