From owner-freebsd-libh Sun Sep 23 20:24:15 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts9-srv.bellnexxia.net (tomts9.bellnexxia.net [209.226.175.53]) by hub.freebsd.org (Postfix) with ESMTP id 37B6D37B405 for ; Sun, 23 Sep 2001 20:24:11 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.92.169.79]) by tomts9-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20010924032410.WEQV1679.tomts9-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Sun, 23 Sep 2001 23:24:10 -0400 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 4A40D1A7C for ; Sun, 23 Sep 2001 23:24:05 -0400 (EDT) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 2D45920B4A; Sun, 23 Sep 2001 23:24:01 -0400 (EDT) Date: Sun, 23 Sep 2001 23:24:00 -0400 From: The Anarcat To: freebsd-libh@freebsd.org Subject: write_changes implementation Message-ID: <20010923232359.C17003@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IDYEmSnFhs3mNXr+" Content-Disposition: inline User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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