Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Sep 2001 23:24:00 -0400
From:      The Anarcat <anarcat@anarcat.dyndns.org>
To:        freebsd-libh@freebsd.org
Subject:   write_changes implementation
Message-ID:  <20010923232359.C17003@shall.anarcat.dyndns.org>

next in thread | raw e-mail | index | archive | help

--IDYEmSnFhs3mNXr+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi.

I have been looking a bit more into this, and tried to implement the
write_changes callback:

--- /usr/ports/misc/libh/work/libh-0.2/release/diskedit/fdiskops.tcl	Sun Ju=
n 10 12:10:03 2001
+++ fdiskops.tcl	Sun Sep 23 23:20:10 2001
@@ -110,3 +110,28 @@
=20
     return ""
 }
+
+proc write_changes {hui button diskname} {
+    global dialog
+    global activedisk
+
+    set disk $activedisk
+   =20
+    if {![$disk modified]} {
+	ok_dialog $hui $dialog "Nothing to write" "Cannot write changes because t=
here wasn't any." "45 2"
+    } else {
+        if {![string compare "YES" [yesno_dialog $hui $dialog "" "Are you =
SURE you want to write your changes to the disk?" "45 2"]]} {
+
+	    if {[$disk Write_Disk]} {
+                ok_dialog $hui $dialog "Write failed" "Cannot write change=
s to disk." "45 2"
+            }
+	   =20
+	    [$dialog byName "diskgeometrylabel"] text\
+		[format "Disk Geometry: %s" \
+		     [disk_geometry_text $disk]]
+           =20
+	    update_slices
+	}
+    }
+    return ""
+}

As a side note, is this the proper channel to submit such patches?

I'm sorry if it isn't.=20

A.

--IDYEmSnFhs3mNXr+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjuup04ACgkQttcWHAnWiGd48ACfR5w2EHV7ev8OjbWpR/+37Tf4
HacAn0NkCact1eDyCgVlD5uyQrpnNnEo
=7xWr
-----END PGP SIGNATURE-----

--IDYEmSnFhs3mNXr+--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-libh" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010923232359.C17003>