From: Wolfgang Denk Date: Sun, 18 Jun 2017 13:03:57 +0200 Subject: [U-Boot] [PATCH v6 3/3] GPT: provide commands to selectively rename partitions In-Reply-To: References: <20170610065138.2410A120BB0@gemini.denx.de> <1497137617-772-1-git-send-email-alison@peloton-tech.com> <20170612074557.E32A3120432@gemini.denx.de> Message-ID: <20170618110357.103A8120607@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Alison, In message you wrote: > > The idea behind the 'swap' mode is that a storage device can have two sets > of partitions, one set all named 'primary' and one set all named 'backup'. > The software updater in userspace can then simply rename the partitions > with sgdisk in order to pick the new image. The swap mode changes the > whole set of labels at once, so there's little chance of being interrupted. It's still a sequential, non-atomic operation, and "little chance" is exactly the places where Murphy likes to hit you. > One additional note: the last version I posted worked fine for the sandbox, > but wouldn't link for an ARM target with the Linaro toolchain, as the > linker couldn't find atoi(). I guess the libc for the x86 compiler > includes it. To test on ARM, I copied in simple_atoi() from > lib/vsprintf.c, but assuredly that is an ugly solution. Does anyone have > a better idea to solve this problem? U-Boot should always be self-contained and not link regular library code from the tool chain. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Looks clean and obviously correct to me, but then _everything_ I write always looks obviously correct to me. - Linus Torvalds in