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>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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 Jun 10 12:10:03 2001
+++ fdiskops.tcl Sun Sep 23 23:20:10 2001
@@ -110,3 +110,28 @@
return ""
}
+
+proc write_changes {hui button diskname} {
+ global dialog
+ global activedisk
+
+ set disk $activedisk
+
+ if {![$disk modified]} {
+ ok_dialog $hui $dialog "Nothing to write" "Cannot write changes because there 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 changes to disk." "45 2"
+ }
+
+ [$dialog byName "diskgeometrylabel"] text\
+ [format "Disk Geometry: %s" \
+ [disk_geometry_text $disk]]
+
+ update_slices
+ }
+ }
+ return ""
+}
As a side note, is this the proper channel to submit such patches?
I'm sorry if it isn't.
A.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjuup04ACgkQttcWHAnWiGd48ACfR5w2EHV7ev8OjbWpR/+37Tf4
HacAn0NkCact1eDyCgVlD5uyQrpnNnEo
=7xWr
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010923232359.C17003>
