Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ac000/libmtdac
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: ac000/libmtdac
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.4.0
Choose a head ref
  • 9 commits
  • 34 files changed
  • 1 contributor

Commits on Aug 6, 2025

  1. Add mtd_is_valid_fmt()

    This function checks that the specified item, such as a NINO, business
    id, tax year, savings account name etc is in the correct format (not
    necessarily that they are actually valid).
    
    Note: The postcode check isn't a strict postcode format check, it just
    checks against what HMRC says is valid for a postcode. E.g. from
    <https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/property-business-api/6.0/oas/page#tag/Annual-Submissions/paths/~1individuals~1business~1property~1uk~1%7Bnino%7D~1%7BbusinessId%7D~1annual~1%7BtaxYear%7D/put>
    
    From the "Request Body schema"
    
      ukProperty -> allowances -> structuredBuildingAllowance -> building ->
      postcode
    
        string ^[0-9a-zA-Z{À-˿’}\- _&`():.'^]{1,90}$
    
        The postcode for the building
    
    Use like
    
      bool ok;
    
      ok = mtd_is_valid_fmt(MTD_VLDT_FMT_NINO, "AB283902D");
      ...
    
    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Aug 6, 2025
    Configuration menu
    Copy the full SHA
    8137a3b View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2025

  1. Configuration menu
    Copy the full SHA
    842fe46 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2025

  1. linux/gen_uuid: Fix the reading of the uuid

    We were checking the result of the fscanf(3), but it was returning 1
    (which is probably correct for matching the requested UUID) but we were
    checking it for 36, then length of the UUID.
    
    Anyway replace fscanf(3) with fread(3), this seems better as we just
    want to read the 36 byte UUID from the procfs file and don't need to do
    any parsing.
    
    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Sep 15, 2025
    Configuration menu
    Copy the full SHA
    4a40e32 View commit details
    Browse the repository at this point in the history
  2. mtd.c: Fix mkdir_p()

    This was somewhat broken, how I didn't notice sooner, I've no idea!
    
    The issue was whenever we did the fstatat(2) check and then proceeded to
    skip the mkdirat(2) we would also skip appending a '/' to the path so
    for a path like /foo/bar we'd end up with /foobar
    
    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Sep 15, 2025
    Configuration menu
    Copy the full SHA
    486958c View commit details
    Browse the repository at this point in the history
  3. mtd.c: Don't prepend a '/' to absolute paths in mkdir_p()

    While it's harmless, e.g. //foo/bar, let's not...
    
    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Sep 15, 2025
    Configuration menu
    Copy the full SHA
    3cadf71 View commit details
    Browse the repository at this point in the history
  4. mtd.c: Some minor cleanup in mkdir_p()

    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Sep 15, 2025
    Configuration menu
    Copy the full SHA
    ebec57f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a13c367 View commit details
    Browse the repository at this point in the history
  6. mtd.c: Check for non-directory components in mkdir_p()

    Check the result of the fstatat(2) to see if we got a non-directory path
    component.
    
    This would really only be a problem if the *last* component wasn't a
    directory as otherwise the mkdirat(2) will catch it.
    
    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Sep 15, 2025
    Configuration menu
    Copy the full SHA
    4a05dc0 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2025

  1. libmtdac 1.4.0

    Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
    ac000 committed Sep 16, 2025
    Configuration menu
    Copy the full SHA
    139ea63 View commit details
    Browse the repository at this point in the history
Loading