From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f52.google.com ([209.85.219.52]) by ewsd; Thu Jun 11 16:02:57 EDT 2020 Received: by mail-qv1-f52.google.com with SMTP id y9so3218736qvs.4 for <9front@9front.org>; Thu, 11 Jun 2020 13:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=tXNVnMETTWiXg/No8AnRGR48ufqemu2LDFhh2tSU4js=; b=abuBTQ3zaBWLNBMF4TzfPGuiIwUN5cUoE4BPC4LPsHk9Y7lD5iRlrWd6Q/HUxfnT+D ASBOevONl/PsPMWA83zWZDUwXCuX5CNr0Sl1nzFCmnEeKGw1atxDloPnJqtETOfoX6kM J1sveSiMTVNUBVWWh1/aA4R0jYeSPpHAsSiucnnfPTQC+Q3lm7GYMKQfHrrIfAVs9+eU oXkn3GjXblYvb/HWqXGza1Hjef8KQy3uZIj5IESW2XKlqpBBQy5USEU6HZQxHTHAPyKH aUUPhmBDEYZsSG1amwFJ3qsJQEnNWW08iWJ8rur/2CA99wL6QrRHIefWn9tjTZAE5+Z3 JPWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=tXNVnMETTWiXg/No8AnRGR48ufqemu2LDFhh2tSU4js=; b=TDLQbRrTgdTA4F29qMwVgRZuZp6QJCHUDwU0YdvjKgr4BtRclUuPVfqfQSrlIKwer2 19FvGlKRHMzL1j7t8vYEqwP6Tw19uxg7/qbODGKwpRJfd8UwWzt995J1G/CCVH1PgMwc 3DQENRt8ll1EnWR1VERnuNBu+z7AypMT+drl61vS/oqi7V54TBVnt3t07ev7LNPSmhk0 p4gEcKtkzRtcneNzJZ2Mk9egla1gIfqemtbwKbCyegosCmsBlTu2AOlhJc533QASyg6G TwYWcPQ5v8VimEelhtUSuDc7EgnU3SUh4bPgR4Sb1uPXbwelFI0S2yCnpP+IFhPeIJR8 Vtdg== X-Gm-Message-State: AOAM530Erjck9NGUtCWSPjUwM9kRYeazccUGeyZrawpLL6cu6ARrlol2 nZvVsCd/zk1Z5JbvyjD+ceij5mgAF4Q= X-Google-Smtp-Source: ABdhPJyCjJCzGc+cZTTPUkfXyBgcXOj8IgQkCG5SY9Xl6hqxmbrKvEwvb19fjGgk8rqaxF4939HMzQ== X-Received: by 2002:a05:6214:10e5:: with SMTP id q5mr3049743qvt.47.1591905774135; Thu, 11 Jun 2020 13:02:54 -0700 (PDT) Return-Path: Received: from delta.localdomain (pool-96-246-81-93.nycmny.fios.verizon.net. [96.246.81.93]) by smtp.gmail.com with ESMTPSA id h50sm3156504qte.25.2020.06.11.13.02.52 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 13:02:53 -0700 (PDT) Date: Thu, 11 Jun 2020 16:02:50 -0400 From: Fazlul Shahriar To: 9front@9front.org Subject: [PATCH] ramfs: change Elocked error string to Go expectation Message-ID: <20200611200250.GA114633@delta.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: distributed JSON blockchain metadata Go expects the error to be one of the three errors returned in Bell Labs Plan 9. As listed in https://github.com/golang/go/blob/f7ba82d68f90e20aa9e6aa973cb6f12321abec71/src/cmd/go/internal/lockedfile/lockedfile_plan9.go#L16: // Opening an exclusive-use file returns an error. // The expected error strings are: // // - "open/create -- file is locked" (cwfs, kfs) // - "exclusive lock" (fossil) // - "exclusive use file already open" (ramfs) var lockedErrStrings = [...]string{ "file is locked", "exclusive lock", "exclusive use file already open", } diff -r 23bc1d0e2dd2 sys/src/cmd/ramfs.c --- a/sys/src/cmd/ramfs.c Tue Jun 09 12:23:24 2020 -0700 +++ b/sys/src/cmd/ramfs.c Thu Jun 11 15:50:56 2020 -0400 @@ -11,7 +11,7 @@ char Enomem[] = "no memory"; char Eperm[] = "permission denied"; char Enotowner[] = "not owner"; -char Elocked[] = "file locked"; +char Elocked[] = "file is locked"; enum { Tdat = 0xbabababa,